RETURN(rc);
}
- if (thread_is_running(&scrub->os_thread)) {
+ if (scrub->os_running) {
if (scrub->os_pos_current > oid)
RETURN(0);
} else if (osd->od_auto_scrub_interval == AS_NEVER) {
insert = false;
trigger:
- if (thread_is_running(&scrub->os_thread)) {
+ if (scrub->os_running) {
if (!dn) {
rc = __osd_obj2dnode(osd->od_os, oid, &dn);
/* The object has been removed (by race maybe). */
out:
if (!rc && !osd_remote_fid(env, osd, fid)) {
- rc = osd_consistency_check(env, osd, obj, fid, oid,
+ /*
+ * this should ask the scrubber to check OI given
+ * the mapping we just found in the dir entry.
+ * but result of that check should not affect
+ * result of the lookup in the directory.
+ * otherwise such a direntry becomes hidden
+ * from the layers above, including LFSCK which
+ * is supposed to fix dangling entries.
+ */
+ osd_consistency_check(env, osd, obj, fid, oid,
S_ISDIR(DTTOIF(oti->oti_zde.lzd_reg.zde_type)));
- /* Only -ENOENT error will affect the lookup result. */
- if (rc != -ENOENT)
- rc = 0;
}
return rc == 0 ? 1 : (rc == -ENOENT ? -ENODATA : rc);
LASSERT(rec1->rec_type != 0);
LASSERT(th != NULL);
- oh = container_of0(th, struct osd_thandle, ot_super);
+ oh = container_of(th, struct osd_thandle, ot_super);
idc = osd_idc_find_or_init(env, osd, fid);
if (IS_ERR(idc))
LASSERT(osd_invariant(parent));
LASSERT(th != NULL);
- oh = container_of0(th, struct osd_thandle, ot_super);
+ oh = container_of(th, struct osd_thandle, ot_super);
idc = osd_idc_find(env, osd, fid);
if (unlikely(idc == NULL)) {
LASSERT(zap_dn != NULL);
LASSERT(th != NULL);
- oh = container_of0(th, struct osd_thandle, ot_super);
+ oh = container_of(th, struct osd_thandle, ot_super);
/*
* In Orion . and .. were stored in the directory (not generated upon
LASSERT(zap_dn);
LASSERT(th != NULL);
- oh = container_of0(th, struct osd_thandle, ot_super);
+ oh = container_of(th, struct osd_thandle, ot_super);
/*
* In Orion . and .. were stored in the directory (not generated upon
ENTRY;
LASSERT(th != NULL);
- oh = container_of0(th, struct osd_thandle, ot_super);
+ oh = container_of(th, struct osd_thandle, ot_super);
LASSERT(obj->oo_dn);
LASSERT(osd_invariant(obj));
LASSERT(th != NULL);
- oh = container_of0(th, struct osd_thandle, ot_super);
+ oh = container_of(th, struct osd_thandle, ot_super);
rc = osd_prepare_key_uint64(obj, k, key);
LASSERT(th != NULL);
LASSERT(obj->oo_dn);
- oh = container_of0(th, struct osd_thandle, ot_super);
+ oh = container_of(th, struct osd_thandle, ot_super);
/* do not specify the key as then DMU is trying to look it up
* which is very expensive. usually the layers above lookup
LASSERT(obj->oo_dn);
LASSERT(th != NULL);
- oh = container_of0(th, struct osd_thandle, ot_super);
+ oh = container_of(th, struct osd_thandle, ot_super);
rc = osd_prepare_key_uint64(obj, k, key);