Whamcloud - gitweb
LU-18869 dne: mdt migrate to check layout 85/58585/8
authorAlexander Zarochentsev <alexander.zarochentsev@hpe.com>
Sat, 29 Mar 2025 09:53:41 +0000 (09:53 +0000)
committerOleg Drokin <green@whamcloud.com>
Wed, 16 Apr 2025 20:41:41 +0000 (20:41 +0000)
commit4b922dec731c2440938e15c04d40f3ab8c3841be
treeb6a2ce3f013030072806fdb8a49d81c7c0a76794
parent4cb897ca4a970a35ef239de6148f487a9683ba2f
LU-18869 dne: mdt migrate to check layout

MDT migrate doesn't check that the requested dir
layout already applied or the old layout conforms
the new one.

Adding a check for that allows to avoid unnecessary
fs opeations especially for repeating migration attempts
after a migration failure.

The following condition and the premature exit from
the migrate procedure:

if (spobj == tpobj)
GOTO(out, rc = -EALREADY);

was removed from mdd_migrate_object() due to it
didn't allow repeat of the same migrate command to
try to migrate objects which had been skipped in the
previous migrate attempt as they were open or had
LinkEA overflow.

lod_striping_from_default() should use named
constant of LMV_OFFSET_DEFAULT instead of -1.

HPE-bug-id: LUS-12657
Signed-off-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Change-Id: Iaacffcc1ecf34c5e01cba57a44c5e3ade97d936a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58585
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/include/dt_object.h
lustre/include/md_object.h
lustre/lod/lod_object.c
lustre/mdd/mdd_dir.c
lustre/mdd/mdd_internal.h
lustre/mdd/mdd_object.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_reint.c
lustre/tests/sanity.sh