LU-17925 utils: fix 'lfs setstripe -c -1' interop
This issue was caused by the -C option was storing -1 as 0xffdf
and -33 was stored as 0xffff, which changed the on-disk file layout
compared to all older versions storing -1 as 0xffff. This resulted
in interop failure of 'lfs setstripe -c/-C' usage.
Instead, store stripe_count as -1 = 0xffff, and -32 = 0xffe0, like
normal unsigned short. There is no need to distinguish "-c -1"
from "-C -1" in the layout since they both mean the same thing, to
allocate one object per OST. However, don't allow "-c -2..-32"
since this has no meaning today. Keep these in reserve in case we
assign some meaning to them in the future.
Restore LLAPI_LAYOUT_WIDE and LOV_ALL_STRIPES definitions, since
these are part of the API and may be used by userspace applications.
Rename LOV_ALL_STRIPES_MIN to LOV_ALL_STRIPES_WIDE since it was
confusing that the "MIN" value created files with the most stripes.
Rename LOV_V1_INSANE_STRIPE_COUNT to LOV_V1_INSANE_STRIPE_INDEX
since it is really the maximum OST index and not a stripe count.
Test-Parameters: testlist=sanity-flr serverversion=2.15 env=SANITY_FLR_EXCEPT="0k 44e 205"
Fixes:
1a6ef725c285 ("LU-16938 utils: setstripe overstripe multiple OST count")
Signed-off-by: Rajeev Mishra <rajeevm@hpe.com>
Change-Id: I3908bd5a70aa35305ef8f278fb0346319055e5b3
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55548
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>