Whamcloud - gitweb
LU-9611 lov: allow lov.*.stripe{size,count}=-1 param 46/27946/5
authorAndreas Dilger <andreas.dilger@intel.com>
Thu, 6 Jul 2017 06:55:08 +0000 (00:55 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 6 Nov 2017 03:42:58 +0000 (03:42 +0000)
commitf93276d9a5b5df475c9f6007265692632d8e7222
tree021a9ec671a3bbcf1b8691e9e758e8bf050acb7b
parent7251fea8dc3c4d29e30c5a3f763c4c33d35f90a7
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.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I295d2591d535b039634689524a29725e963ebbe5
Reviewed-on: https://review.whamcloud.com/27946
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
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>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/lod/lproc_lod.c
lustre/lov/lproc_lov.c
lustre/obdclass/obd_config.c