Whamcloud - gitweb
LU-13440 utils: fix handling of lsa_stripe_off = -1 30/43530/1
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 4 May 2021 01:25:23 +0000 (19:25 -0600)
committerAndreas Dilger <adilger@whamcloud.com>
Tue, 4 May 2021 09:04:18 +0000 (03:04 -0600)
commit792fa045a1975a1a18af0d72470134e5bf997d6a
tree32d2fab7b0f9b7ba71e0f432ddff496269a1b365
parent645146c95feb6b330d0aaaf8edea1e5c09a6a46b
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.

Fixes: f167f78e3bfd ("LU-13440 lmv: add default LMV inherit depth")
Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ic934f859173155b1b2df56fcd315c8da633ebbe5
lustre/tests/sanity.sh
lustre/utils/lfs.c