Whamcloud - gitweb
LU-18824 utils: Fix lfs migrate with --overstripe-count 72/58672/5
authorPatrick Farrell <pfarrell@whamcloud.com>
Thu, 3 Apr 2025 22:16:46 +0000 (18:16 -0400)
committerOleg Drokin <green@whamcloud.com>
Thu, 12 Jun 2025 06:34:58 +0000 (06:34 +0000)
commitc2b59218e5fba8ca5bcff8a1e01e2f1f2c668426
tree5d986e8866b8ecb03fb87349c2f7854248a2892c
parent7d9de9ab9f04c763b3c46a5ec2aff4b0769817fa
LU-18824 utils: Fix lfs migrate with --overstripe-count

The --overstripe-count (-C) option was not being properly
honored during  file migration. When using lfs migrate with
this option, the overstriping flag was set but the
LLAPI_LAYOUT_OVERSTRIPING pattern was not applied to the
destination file.

This was because in lfs_setstripe_internal(), the code only
set lsa.lsa_pattern = LLAPI_LAYOUT_OVERSTRIPING when not in
migrate mode.

Fix this by always setting the pattern when the overstriped
flag is true, regardless of whether we're in migrate mode or
not.

Added a test case (27X) to verify that lfs migrate properly
applies overstriping

NB: This fix and test were generated and tested by the VS
Code Augment Agent after being given the LU URL and some
prompting.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I734b9d4e3c699e335c9d810bba2e2d2a1c301ed6
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58672
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/tests/sanity.sh
lustre/utils/lfs.c