]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.arch/s390-01-04-fcpperf-1.patch
Revert "Move xen patchset to new version's subdir."
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.arch / s390-01-04-fcpperf-1.patch
CommitLineData
00e5a55c
BS
1From: Gerald Schaefer <geraldsc@de.ibm.com>
2Subject: (kernel):FCP - Performance Data colletion & analysis
3References: bnc#417243
4
5This header file is of interest for user space programming, i.e.
6for tools that process blktrace data.
7
8We would like to use it for a tool on-top of blktrace which processes
9data provided by blktrace. For this purpose, it would be helpful
10if the blktrace API would make it to /usr/include/linux.
11
12The git tree for the blktrace tools comes with its own copy of this header
13file. I didn't manage to replace that copy with the file generated
14by the patch below yet. A few more cleanups would be needed.
15For example, the blktrace ioctl numbers, which are currently defined in
16usr/include/fs.h, might need to be moved. Should be feasible, though.
17
18
19Signed-off-by: Sven Schuetz <sven@linux.vnet.ibm.com>
20Signed-off-by: Martin Peschke <mp3@de.ibm.com>
21
22Acked-by: John Jolly <jjolly@suse.de>
23
24---
25 include/linux/Kbuild | 1
26 include/linux/blktrace_api.h | 58 +++++++++++++++++++++++--------------------
27 2 files changed, 33 insertions(+), 26 deletions(-)
28
29--- a/include/linux/blktrace_api.h
30+++ b/include/linux/blktrace_api.h
31@@ -1,8 +1,10 @@
32 #ifndef BLKTRACE_H
33 #define BLKTRACE_H
34
35+#ifdef __KERNEL__
36 #include <linux/blkdev.h>
37 #include <linux/relay.h>
38+#endif
39
40 /*
41 * Trace categories
42@@ -89,17 +91,17 @@ enum blktrace_notify {
43 * The trace itself
44 */
45 struct blk_io_trace {
46- u32 magic; /* MAGIC << 8 | version */
47- u32 sequence; /* event number */
48- u64 time; /* in microseconds */
49- u64 sector; /* disk offset */
50- u32 bytes; /* transfer length */
51- u32 action; /* what happened */
52- u32 pid; /* who did it */
53- u32 device; /* device number */
54- u32 cpu; /* on what cpu did it happen */
55- u16 error; /* completion error */
56- u16 pdu_len; /* length of data after this trace */
57+ __u32 magic; /* MAGIC << 8 | version */
58+ __u32 sequence; /* event number */
59+ __u64 time; /* in microseconds */
60+ __u64 sector; /* disk offset */
61+ __u32 bytes; /* transfer length */
62+ __u32 action; /* what happened */
63+ __u32 pid; /* who did it */
64+ __u32 device; /* device number */
65+ __u32 cpu; /* on what cpu did it happen */
66+ __u16 error; /* completion error */
67+ __u16 pdu_len; /* length of data after this trace */
68 };
69
70 /*
71@@ -117,6 +119,25 @@ enum {
72 Blktrace_stopped,
73 };
74
75+/*
76+ * User setup structure passed with BLKTRACESTART
77+ */
78+struct blk_user_trace_setup {
79+#ifdef __KERNEL__
80+ char name[BDEVNAME_SIZE]; /* output */
81+#else
82+ char name[32]; /* output */
83+#endif
84+ __u16 act_mask; /* input */
85+ __u32 buf_size; /* input */
86+ __u32 buf_nr; /* input */
87+ __u64 start_lba;
88+ __u64 end_lba;
89+ __u32 pid;
90+};
91+
92+#ifdef __KERNEL__
93+#if defined(CONFIG_BLK_DEV_IO_TRACE)
94 struct blk_trace {
95 int trace_state;
96 struct rchan *rchan;
97@@ -133,21 +154,6 @@ struct blk_trace {
98 atomic_t dropped;
99 };
100
101-/*
102- * User setup structure passed with BLKTRACESTART
103- */
104-struct blk_user_trace_setup {
105- char name[BDEVNAME_SIZE]; /* output */
106- u16 act_mask; /* input */
107- u32 buf_size; /* input */
108- u32 buf_nr; /* input */
109- u64 start_lba;
110- u64 end_lba;
111- u32 pid;
112-};
113-
114-#ifdef __KERNEL__
115-#if defined(CONFIG_BLK_DEV_IO_TRACE)
116 extern int blk_trace_ioctl(struct block_device *, unsigned, char __user *);
117 extern void blk_trace_shutdown(struct request_queue *);
118 extern void __blk_add_trace(struct blk_trace *, sector_t, int, int, u32, int, int, void *);
119--- a/include/linux/Kbuild
120+++ b/include/linux/Kbuild
121@@ -181,6 +181,7 @@ unifdef-y += audit.h
122 unifdef-y += auto_fs.h
123 unifdef-y += auxvec.h
124 unifdef-y += binfmts.h
125+unifdef-y += blktrace_api.h
126 unifdef-y += capability.h
127 unifdef-y += capi.h
128 unifdef-y += cciss_ioctl.h