Whamcloud - gitweb
LU-8066 lov: fix lov.*.stripeoffset printing 19/33019/3
authorAndreas Dilger <adilger@whamcloud.com>
Fri, 17 Aug 2018 18:48:44 +0000 (12:48 -0600)
committerOleg Drokin <green@whamcloud.com>
Thu, 23 Aug 2018 07:19:13 +0000 (07:19 +0000)
The move of lov.*.stripeoffset from /proc to /sys in commit 3c900918
reverted the printing of stripeoffset from a signed value to an
unsigned value, which is broken for the common value of "-1".  This
was previously fixed in LU-9611 commit f93276d9.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ib61305ddbf902dd74ac0e16c0c2fe6920052ddf4
Reviewed-on: https://review.whamcloud.com/33019
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/lov/lproc_lov.c

index e93b6f2..fca6a8c 100644 (file)
@@ -81,7 +81,7 @@ static ssize_t stripeoffset_show(struct kobject *kobj, struct attribute *attr,
                                              obd_kset.kobj);
        struct lov_desc *desc = &dev->u.lov.desc;
 
-       return sprintf(buf, "%llu\n", desc->ld_default_stripe_offset);
+       return sprintf(buf, "%lld\n", desc->ld_default_stripe_offset);
 }
 
 static ssize_t stripeoffset_store(struct kobject *kobj, struct attribute *attr,