struct obd_export *tgt_exp;
struct lu_fid rid = *fid;
__u32 seg_end, max_hash = MAX_HASH_SIZE;
- int rc;
+ int rc = 0;
/*
- * We have reached the end of this hash segment,
- * and the start offset of next segment need to
- * be gotten out from the next segment, set it to
- * the end of this segment.
- * */
+ * We have reached the end of this hash segment, and the start offset of
+ * next segment need to be gotten out from the next segment, set it to
+ * the end of this segment. */
do_div(max_hash, obj->lo_objcount);
seg_end = max_hash * index;
rc = 0;
}
kmap(page);
- next_dp = page_address(page);
+ next_dp = cfs_page_address(page);
LASSERT(le32_to_cpu(next_dp->ldp_hash_start) >= seg_end);
dp->ldp_hash_end = next_dp->ldp_hash_start;
kunmap(page);
rc = md_readpage(tgt_exp, &rid, offset, page, request);
if (rc)
GOTO(cleanup, rc);
-#ifdef __KERNEL__
+
if (obj && i < obj->lo_objcount - 1) {
struct lu_dirpage *dp;
__u32 end;
kmap(page);
- dp = page_address(page);
+ dp = cfs_page_address(page);
end = le32_to_cpu(dp->ldp_hash_end);
if (end == ~0ul)
rc = lmv_reset_hash_seg_end(lmv, obj, fid,
} else
if (rc == -ERANGE)
rc = -EIO;
-#endif
+
/*
* Here we could remove "." and ".." from all pages which at not from
* master. But MDS has only "." and ".." for master dir.
int rc;
ENTRY;
+ if (MDT_FAIL_CHECK(OBD_FAIL_MDS_REINT_NET))
+ RETURN(0);
+
if (MDT_FAIL_CHECK(OBD_FAIL_MDS_REINT_UNPACK))
RETURN(-EFAULT);
if (rc != 0)
RETURN(rc);
- /*pack reply*/
+ /* pack reply */
if (req_capsule_has_field(pill, &RMF_MDT_MD, RCL_SERVER))
req_capsule_set_size(pill, &RMF_MDT_MD, RCL_SERVER,
mdt->mdt_max_mdsize);