Whamcloud - gitweb
LU-10887 lfsck: offer shard's mode when re-create it 76/32076/2
authorFan Yong <fan.yong@intel.com>
Mon, 9 Apr 2018 14:11:31 +0000 (22:11 +0800)
committerJohn L. Hammond <john.hammond@intel.com>
Thu, 3 May 2018 20:11:46 +0000 (20:11 +0000)
The namespace will re-create the lost shard of a broken stripe
directory if "-C" option specified. Under such case, the @mode
parameter should be given properly.

Lustre-change: https://review.whamcloud.com/31915
Lustre-commit: 7d48050b7a3ba0b9db2ff823bc6fbc3091506597

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I2441d8ca83c932a34ef1971d334f54ecd7343b27
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/32076
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/lfsck/lfsck_namespace.c

index 03aae72..2fc7b98 100644 (file)
@@ -3996,6 +3996,7 @@ static void lfsck_namespace_close_dir(const struct lu_env *env,
        lnr->lnr_fid = *lfsck_dto2fid(lfsck->li_obj_dir);
        lnr->lnr_dir_cookie = MDS_DIR_END_OFF;
        lnr->lnr_size = size;
+       lnr->lnr_type = lso->lso_attr.la_mode;
 
        spin_lock(&lad->lad_lock);
        if (lad->lad_assistant_status < 0 ||