Whamcloud - gitweb
LU-9611 lod: allow -1 for default stripe count/offset 73/27473/3
authorAndreas Dilger <andreas.dilger@intel.com>
Tue, 6 Jun 2017 21:38:15 +0000 (15:38 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 16 Jun 2017 16:57:02 +0000 (16:57 +0000)
commita4771a6935a97376cc93dfaf023b0a12e9d07511
tree5f16e3ec42d220330c4f61fda711dccfcefa3a72
parent34bfd0802358fccc8fb327ebf01de1ccfd396928
LU-9611 lod: allow -1 for default stripe count/offset

Since LU-7344 patch http://review.whamcloud.com/16930 was landed,
lod_stripeoffset_seq_write() and lod_stripecount_seq_write() have
incorrectly checked that lod.*.stripecount and lod.*.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

Add comment blocks to lod_fix_desc_stripe*() to indicate their use.
Fix these functions to allow "-1" as a valid value.
Fix the error message to properly indicate which device is being
modified, in case multiple filesystems are mounted.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I295d2591d535b039634689524a29725e96ce2c01
Reviewed-on: https://review.whamcloud.com/27473
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/lod/lod_lov.c
lustre/lod/lproc_lod.c
lustre/obdclass/obd_config.c