Whamcloud - gitweb
LU-13440 utils: fix handling of lsa_stripe_off -1
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 4 May 2021 01:25:23 +0000 (19:25 -0600)
committerAndreas Dilger <adilger@whamcloud.com>
Wed, 5 May 2021 04:06:42 +0000 (04:06 +0000)
commit50075df7f81e0f9986db81918b32ec469619eb13
tree14ec1b04f428e42391bf289dd9bf8c3bfff247d9
parent7f816b2745aad96926df971ac6c636d7133fd43e
LU-13440 utils: fix handling of lsa_stripe_off -1

Use LMV_OFFSET_DEFAULT instead of "-1" for parsing lfs_setdirstripe()
since parse_targets() will return "(__u32)-1" to the caller for the
stripe index, but lsa_stripe_off is a signed long long so it is
interpreted as 4294967295.  This causes the parsing to fail when
"lfs setdirstripe -i -1 --max-inherit-rr 1" is used.

Update sanity test_413a/413c to also specify "-i -1" to verify this.

Lustre-change: https://review.whamcloud.com/43530
Lustre-commit: TBD (from 792fa045a1975a1a18af0d72470134e5bf997d6a)

Fixes: 01d34a6b3b2e ("LU-13440 lmv: add default LMV inherit depth")
Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ic934f859173155b1b2df56fcd315c8da633ebbe5
Reviewed-on: https://review.whamcloud.com/43524
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/tests/sanity.sh
lustre/utils/lfs.c