]> granicus.if.org Git - sysstat/blob - cifsiostat.h
A_IRQ: sadf: Update PCP interface for interrupts statistics
[sysstat] / cifsiostat.h
1 /*
2  * cifsiostat: Report CIFS statistics
3  * Copyright (C) 2010 Red Hat, Inc. All Rights Reserved
4  * Written by Ivana Varekova <varekova@redhat.com>
5  */
6
7 #ifndef _CIFSIOSTAT_H
8 #define _CIFSIOSTAT_H
9
10 #include "common.h"
11
12 #define CIFSSTATS  PRE "/proc/fs/cifs/Stats"
13
14 /* I_: cifsiostat - D_: Display - F_: Flag */
15 #define I_D_TIMESTAMP           0x001
16 #define I_D_KILOBYTES           0x002
17 #define I_D_MEGABYTES           0x004
18 #define I_D_ISO                 0x008
19 #define I_D_PRETTY              0x010
20 #define I_D_DEBUG               0x020
21 #define I_D_UNIT                0x040
22
23 #define DISPLAY_TIMESTAMP(m)    (((m) & I_D_TIMESTAMP) == I_D_TIMESTAMP)
24 #define DISPLAY_KILOBYTES(m)    (((m) & I_D_KILOBYTES) == I_D_KILOBYTES)
25 #define DISPLAY_MEGABYTES(m)    (((m) & I_D_MEGABYTES) == I_D_MEGABYTES)
26 #define DISPLAY_ISO(m)          (((m) & I_D_ISO)       == I_D_ISO)
27 #define DISPLAY_PRETTY(m)       (((m) & I_D_PRETTY)    == I_D_PRETTY)
28 #define DISPLAY_DEBUG(m)        (((m) & I_D_DEBUG)     == I_D_DEBUG)
29 #define DISPLAY_UNIT(m)         (((m) & I_D_UNIT)      == I_D_UNIT)
30
31 struct cifs_st {
32         unsigned long long rd_bytes     __attribute__ ((aligned (8)));
33         unsigned long long wr_bytes     __attribute__ ((packed));
34         unsigned long long rd_ops       __attribute__ ((packed));
35         unsigned long long wr_ops       __attribute__ ((packed));
36         unsigned long long fopens       __attribute__ ((packed));
37         unsigned long long fcloses      __attribute__ ((packed));
38         unsigned long long fdeletes     __attribute__ ((packed));
39 };
40
41 #define CIFS_ST_SIZE    (sizeof(struct cifs_st))
42
43 struct io_cifs {
44         char name[MAX_NAME_LEN];
45         int exist;
46         struct cifs_st *cifs_stats[2];
47         struct io_cifs *next;
48 };
49
50 #define IO_CIFS_SIZE    (sizeof(struct io_cifs))
51
52 #endif  /* _CIFSIOSTAT_H */