@@ -442,6 +442,7 @@
#define OBD_FAIL_LLITE_XATTR_ENOMEM 0x1405
#define OBD_FAIL_MAKE_LOVEA_HOLE 0x1406
#define OBD_FAIL_LLITE_LOST_LAYOUT 0x1407
+#define OBD_FAIL_LLITE_NO_CHECK_DEAD 0x1408
#define OBD_FAIL_GETATTR_DELAY 0x1409
#define OBD_FAIL_LLITE_CREATE_NODE_PAUSE 0x140c
#define OBD_FAIL_LLITE_IMUTEX_SEC 0x140e
@@ -433,6 +433,10 @@ static int ll_dir_setdirstripe(struct dentry *dparent, struct lmv_user_md *lump,
!(exp_connect_flags(sbi->ll_md_exp) & OBD_CONNECT_DIR_STRIPE))
return -EINVAL;
+ if (IS_DEADDIR(parent) &&
+ !OBD_FAIL_CHECK(OBD_FAIL_LLITE_NO_CHECK_DEAD))
+ return -ENOENT;
+
if (lump->lum_magic != cpu_to_le32(LMV_USER_MAGIC) &&
lump->lum_magic != cpu_to_le32(LMV_USER_MAGIC_SPECIFIC))
lustre_swab_lmv_user_md(lump);