Whamcloud - gitweb
LU-5123 procfs: u64 helper does not respect multiplier 35/10535/5
authorStephen Champion <schamp@sgi.com>
Sat, 31 May 2014 00:35:45 +0000 (17:35 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 25 Jun 2014 21:51:16 +0000 (21:51 +0000)
lprocfs_write_frac_u64_helper should apply the multiplier argument to
the value if units are not specified by the user.  It has been
overriding the multiplier with '1' regardless.

Signed-off-by: Stephen Champion <schamp@sgi.com>
Change-Id: Iaacbb6923122479ba1ba4a5ee0088c670245d081
Reviewed-on: http://review.whamcloud.com/10535
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/obdclass/lprocfs_status.c

index d81ebc3..885b4d4 100644 (file)
@@ -2487,7 +2487,7 @@ int lprocfs_write_frac_u64_helper(const char *buffer, unsigned long count,
                }
        }
         /* Specified units override the multiplier */
-        if (units)
+       if (units > 1)
                 mult = mult < 0 ? -units : units;
 
         frac *= mult;