#define OBD_FAIL_MDS_REINT_MULTI_NET 0x159
#define OBD_FAIL_MDS_REINT_MULTI_NET_REP 0x15a
#define OBD_FAIL_MDS_LLOG_CREATE_FAILED2 0x15b
+#define OBD_FAIL_MDS_FLD_LOOKUP 0x15c
#define OBD_FAIL_MDS_INTENT_DELAY 0x160
/* layout lock */
ostid_cpu_to_le(&info->lti_ostid, &objs[i].l_ost_oi);
objs[i].l_ost_gen = cpu_to_le32(0);
- rc = lod_fld_lookup(env, lod, fid, &index, &type);
+ if (OBD_FAIL_CHECK(OBD_FAIL_MDS_FLD_LOOKUP))
+ rc = -ENOENT;
+ else
+ rc = lod_fld_lookup(env, lod, fid,
+ &index, &type);
if (rc < 0) {
CERROR("%s: Can not locate "DFID": rc = %d\n",
lod2obd(lod)->obd_name, PFID(fid), rc);
rep->lock_policy_res2 = clear_serious(rc);
if (rep->lock_policy_res2 == -ENOENT &&
- mdt_get_disposition(rep, DISP_LOOKUP_NEG))
- rep->lock_policy_res2 = 0;
+ mdt_get_disposition(rep, DISP_LOOKUP_NEG) &&
+ !mdt_get_disposition(rep, DISP_OPEN_CREATE))
+ rep->lock_policy_res2 = 0;
lhc->mlh_reg_lh.cookie = 0ull;
if (rc == -ENOTCONN || rc == -ENODEV ||
}
run_test 401 "Verify if 'lctl list_param -R' can list parameters recursively"
+test_402() {
+ $LFS setdirstripe -i 0 $DIR/$tdir || error "setdirstripe -i 0 failed"
+#define OBD_FAIL_MDS_FLD_LOOKUP 0x15c
+ do_facet mds1 "lctl set_param fail_loc=0x8000015c"
+ touch $DIR/$tdir/$tfile && error "touch should fail with ENOENT" ||
+ echo "Touch failed - OK"
+}
+run_test 402 "Return ENOENT to lod_generate_and_set_lovea"
+
#
# tests that do cleanup/setup should be run at the end
#