Whamcloud - gitweb
LU-9611 lov: allow lov.*.stripe{size,count}=-1 param 07/30407/3
authorAndreas Dilger <andreas.dilger@intel.com>
Thu, 6 Jul 2017 06:55:08 +0000 (00:55 -0600)
committerJohn L. Hammond <john.hammond@intel.com>
Tue, 19 Dec 2017 20:15:04 +0000 (20:15 +0000)
commitbb1663cb01744b68aa29d625cea8652ae0457257
tree9bc2c0ac6577ac9bde986d2093914c217760202c
parenteb9c7a25c8d62e549d1c41df0bf047bc2b1d63b4
LU-9611 lov: allow lov.*.stripe{size,count}=-1 param

Since LU-7344 patch http://review.whamcloud.com/16930 was landed,
lov_stripeoffset_seq_write() and lov_stripecount_seq_write() have
incorrectly checked that lov.*.stripecount and lov.*.stripeoffset
are not negative.  In fact they can both be "-1" to indicate that
the filesystem-wide default value should be used. These parameters
can also be set internally if using "lfs setstripe -c -1 $MOUNT"
or "lfs setstripe -i -1 $MOUNT" to set the system wide default,
generating console errors on the MDS from class_process_proc_param():

    lov.: error writing proc entry 'stripecount': rc = -34
    lov.: error writing proc entry 'stripeoffset': rc = -34

Fix these functions to allow "-1" as a valid value.

Lustre-change: https://review.whamcloud.com/27946
Lustre-commit: f93276d9a5b5df475c9f6007265692632d8e7222

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I295d2591d535b039634689524a29725e963ebbe5
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30407
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/include/lustre/lustre_idl.h
lustre/lod/lproc_lod.c
lustre/lov/lproc_lov.c
lustre/obdclass/obd_config.c