X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Finclude%2Flprocfs_status.h;fp=lustre%2Finclude%2Flprocfs_status.h;h=e9d51e60b4a2f38bde86831926ca2d47fdf43764;hb=ba2817fe3ead1b8e32be6d6c6ce25b490626118a;hp=3da912c7f080c2ab83af6afb4b82eed3409622d1;hpb=743b85a32e24cff0c77dff739691043970a0901e;p=fs%2Flustre-release.git diff --git a/lustre/include/lprocfs_status.h b/lustre/include/lprocfs_status.h index 3da912c..e9d51e6 100644 --- a/lustre/include/lprocfs_status.h +++ b/lustre/include/lprocfs_status.h @@ -63,6 +63,9 @@ static inline unsigned int pct(unsigned long a, unsigned long b) return b ? a * 100 / b : 0; } +#define PAGES_TO_MiB(pages) ((pages) >> (20 - PAGE_SHIFT)) +#define MiB_TO_PAGES(mb) ((mb) << (20 - PAGE_SHIFT)) + /** * Append a space separated list of current set flags to str. */ @@ -609,9 +612,6 @@ extern ssize_t lprocfs_pinger_recov_seq_write(struct file *file, const char __user *buffer, size_t count, loff_t *off); -extern int lprocfs_seq_read_frac_helper(struct seq_file *m, long val, int mult); -extern int lprocfs_read_frac_helper(char *buffer, unsigned long count, - long val, int mult); extern int lprocfs_str_with_units_to_s64(const char __user *buffer, unsigned long count, __s64 *val, char defunit);