Whamcloud - gitweb
LU-11025 lmv: simplify name to stripe mapping 11/37711/4
authorLai Siyao <lai.siyao@whamcloud.com>
Sat, 15 Feb 2020 02:48:59 +0000 (10:48 +0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 31 Mar 2020 06:59:20 +0000 (06:59 +0000)
commit703afd15fc939ad4f425364ddc033080630c0127
tree8d06d2b5172f1e432e47ef8f578e73059ab75fbe
parentb2eef3dd2f042b629b8bb25dc963ad5c7da86f22
LU-11025 lmv: simplify name to stripe mapping

Handle layout change internally when mapping name to stripe:
* Move layout changing related code into lmv name to stripe mapping
  so callers doesn't need to take care of the internals.
* lmv_name_to_stripe_index() maps name in new layout, and
  lmv_name_to_stripe_index_old() in old layout.
* rename lmv_migrate_existence_check() to lmv_old_layout_lookup()
  to support directory restripe in the future.
* support layout changing directory in LFSCK.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: Icf8bda5db884784f761a2d373a6f81d7e13f525f
Reviewed-on: https://review.whamcloud.com/37711
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 files changed:
lustre/include/lustre_lmv.h
lustre/include/obd.h
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/lfsck/lfsck_striped_dir.c
lustre/lmv/lmv_intent.c
lustre/lmv/lmv_internal.h
lustre/lmv/lmv_obd.c
lustre/lod/lod_object.c
lustre/mdd/mdd_dir.c
lustre/mdt/mdt_reint.c
lustre/obdecho/echo_client.c