X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=lustre%2Finclude%2Flprocfs_status.h;h=cad6c92c048dfcbaec5e03d34eeaa14d73f7a63d;hb=1932a135cf8cedcea2d0f2d5be21edd7fe306251;hp=11bc074829c8fd34fab9dddc4f86bc7c66d5b841;hpb=84d5f6b6d92b097684110de51e8a3ce022ee7220;p=fs%2Flustre-release.git diff --git a/lustre/include/lprocfs_status.h b/lustre/include/lprocfs_status.h index 11bc074..cad6c92 100644 --- a/lustre/include/lprocfs_status.h +++ b/lustre/include/lprocfs_status.h @@ -150,6 +150,7 @@ struct lprocfs_counter { unsigned int lc_config; __s64 lc_count; __s64 lc_sum; + __s64 lc_sum_irq; __s64 lc_min; __s64 lc_max; __s64 lc_sumsquare; @@ -423,6 +424,7 @@ extern void lprocfs_counter_init(struct lprocfs_stats *stats, int index, unsigned conf, const char *name, const char *units); extern void lprocfs_free_obd_stats(struct obd_device *obddev); +extern void lprocfs_free_md_stats(struct obd_device *obddev); struct obd_export; struct nid_stat; extern int lprocfs_add_clear_entry(struct obd_device * obd, @@ -578,14 +580,27 @@ extern struct rw_semaphore _lprocfs_lock; #define LPROCFS_EXIT() do { \ up_read(&_lprocfs_lock); \ } while(0) -#define LPROCFS_ENTRY_AND_CHECK(dp) do { \ - typecheck(struct proc_dir_entry *, dp); \ - LPROCFS_ENTRY(); \ - if ((dp)->deleted) { \ - LPROCFS_EXIT(); \ - return -ENODEV; \ - } \ -} while(0) + +#ifdef HAVE_PROCFS_DELETED +static inline +int LPROCFS_ENTRY_AND_CHECK(struct proc_dir_entry *dp) +{ + LPROCFS_ENTRY(); + if ((dp)->deleted) { + LPROCFS_EXIT(); + return -ENODEV; + } + return 0; +} +#else +static inline +int LPROCFS_ENTRY_AND_CHECK(struct proc_dir_entry *dp) +{ + LPROCFS_ENTRY(); + return 0; +} +#endif + #define LPROCFS_WRITE_ENTRY() do { \ down_write(&_lprocfs_lock); \ } while(0) @@ -593,6 +608,7 @@ extern struct rw_semaphore _lprocfs_lock; up_write(&_lprocfs_lock); \ } while(0) + /* You must use these macros when you want to refer to * the import in a client obd_device for a lprocfs entry */ #define LPROCFS_CLIMP_CHECK(obd) do { \ @@ -743,6 +759,8 @@ static inline int lprocfs_alloc_md_stats(struct obd_device *obddev, { return 0; } static inline void lprocfs_free_obd_stats(struct obd_device *obddev) { return; } +static inline void lprocfs_free_md_stats(struct obd_device *obddev) +{ return; } struct obd_export; static inline int lprocfs_add_clear_entry(struct obd_export *exp)