Whamcloud - gitweb
LU-10887 lfsck: offer shard's mode when re-create it 15/31915/3
authorFan Yong <fan.yong@intel.com>
Mon, 9 Apr 2018 14:11:31 +0000 (22:11 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 19 Apr 2018 04:37:56 +0000 (04:37 +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.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I2441d8ca83c932a34ef1971d334f54ecd7343b27
Reviewed-on: https://review.whamcloud.com/31915
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/lfsck/lfsck_namespace.c

index b613511..fd41129 100644 (file)
@@ -4144,6 +4144,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 ||