Whamcloud - gitweb
LU-10171 lmv: avoid gratuitous 64-bit modulus
[fs/lustre-release.git] / lustre / include / lprocfs_status.h
index d42981d..3da912c 100644 (file)
@@ -58,6 +58,11 @@ struct lprocfs_vars {
        mode_t                           proc_mode;
 };
 
+static inline unsigned int pct(unsigned long a, unsigned long b)
+{
+       return b ? a * 100 / b : 0;
+}
+
 /**
  * Append a space separated list of current set flags to str.
  */
@@ -593,9 +598,9 @@ lprocfs_evict_client_seq_write(struct file *file, const char __user *buffer,
 #endif
 ssize_t ping_store(struct kobject *kobj, struct attribute *attr,
                   const char *buffer, size_t count);
-extern ssize_t
-lprocfs_ping_seq_write(struct file *file, const char __user *buffer,
-                      size_t count, loff_t *off);
+ssize_t ping_show(struct kobject *kobj, struct attribute *attr,
+                 char *buffer);
+
 extern ssize_t
 lprocfs_import_seq_write(struct file *file, const char __user *buffer,
                         size_t count, loff_t *off);