]> granicus.if.org Git - sysstat/blob - cifsiostat.h
First use of git system. Based on a complete sysstat 9.1.5 version.
[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  "/proc/fs/cifs/Stats"
13
14 /* I_: iostat - 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_HUMAN_READ          0x010
20
21 #define DISPLAY_TIMESTAMP(m)    (((m) & I_D_TIMESTAMP)     == I_D_TIMESTAMP)
22 #define DISPLAY_KILOBYTES(m)    (((m) & I_D_KILOBYTES)     == I_D_KILOBYTES)
23 #define DISPLAY_MEGABYTES(m)    (((m) & I_D_MEGABYTES)     == I_D_MEGABYTES)
24 #define DISPLAY_ISO(m)          (((m) & I_D_ISO)           == I_D_ISO)
25 #define DISPLAY_HUMAN_READ(m)   (((m) & I_D_HUMAN_READ)    == I_D_HUMAN_READ)
26
27 /* Preallocation constats */
28 #define NR_CIFS_PREALLOC        2
29
30 struct cifs_stats {
31         unsigned long long rd_bytes     __attribute__ ((aligned (8)));
32         unsigned long long wr_bytes     __attribute__ ((packed));
33         unsigned long long rd_ops       __attribute__ ((packed));
34         unsigned long long wr_ops       __attribute__ ((packed));
35         unsigned long long fopens       __attribute__ ((packed));
36         unsigned long long fcloses      __attribute__ ((packed));
37         unsigned long long fdeletes     __attribute__ ((packed));
38 };
39
40 #define CIFS_STATS_SIZE (sizeof(struct cifs_stats))
41
42 struct io_hdr_stats {
43         unsigned int active             __attribute__ ((aligned (4)));
44         unsigned int used               __attribute__ ((packed));
45         char name[MAX_NAME_LEN];
46 };
47
48 #define IO_HDR_STATS_SIZE       (sizeof(struct io_hdr_stats))
49
50 #endif  /* _CIFSIOSTAT_H */