4 #include <linux/types.h>
5 #include <linux/mutex.h>
6 #include <linux/list.h>
8 int dm_statistics_init(void);
9 void dm_statistics_exit(void);
13 struct list_head list
; /* list of struct dm_stat */
14 struct dm_stats_last_position __percpu
*last
;
21 unsigned long long duration_ns
;
24 void dm_stats_init(struct dm_stats
*st
);
25 void dm_stats_cleanup(struct dm_stats
*st
);
29 int dm_stats_message(struct mapped_device
*md
, unsigned argc
, char **argv
,
30 char *result
, unsigned maxlen
);
32 void dm_stats_account_io(struct dm_stats
*stats
, unsigned long bi_rw
,
33 sector_t bi_sector
, unsigned bi_sectors
, bool end
,
34 unsigned long duration_jiffies
,
35 struct dm_stats_aux
*aux
);
37 static inline bool dm_stats_used(struct dm_stats
*st
)
39 return !list_empty(&st
->list
);