aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/blktrace_api.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/blktrace_api.h')
-rw-r--r--include/linux/blktrace_api.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h
index 3680ff9a30ed..7e11d23ac36a 100644
--- a/include/linux/blktrace_api.h
+++ b/include/linux/blktrace_api.h
@@ -105,7 +105,7 @@ struct blk_io_trace {
105 */ 105 */
106struct blk_io_trace_remap { 106struct blk_io_trace_remap {
107 __be32 device; 107 __be32 device;
108 u32 __pad; 108 __be32 device_from;
109 __be64 sector; 109 __be64 sector;
110}; 110};
111 111
@@ -142,10 +142,14 @@ struct blk_user_trace_setup {
142 u32 pid; 142 u32 pid;
143}; 143};
144 144
145#ifdef __KERNEL__
145#if defined(CONFIG_BLK_DEV_IO_TRACE) 146#if defined(CONFIG_BLK_DEV_IO_TRACE)
146extern int blk_trace_ioctl(struct block_device *, unsigned, char __user *); 147extern int blk_trace_ioctl(struct block_device *, unsigned, char __user *);
147extern void blk_trace_shutdown(request_queue_t *); 148extern void blk_trace_shutdown(struct request_queue *);
148extern void __blk_add_trace(struct blk_trace *, sector_t, int, int, u32, int, int, void *); 149extern void __blk_add_trace(struct blk_trace *, sector_t, int, int, u32, int, int, void *);
150extern int do_blk_trace_setup(struct request_queue *q,
151 struct block_device *bdev, struct blk_user_trace_setup *buts);
152
149 153
150/** 154/**
151 * blk_add_trace_rq - Add a trace for a request oriented action 155 * blk_add_trace_rq - Add a trace for a request oriented action
@@ -272,6 +276,7 @@ static inline void blk_add_trace_remap(struct request_queue *q, struct bio *bio,
272 return; 276 return;
273 277
274 r.device = cpu_to_be32(dev); 278 r.device = cpu_to_be32(dev);
279 r.device_from = cpu_to_be32(bio->bi_bdev->bd_dev);
275 r.sector = cpu_to_be64(to); 280 r.sector = cpu_to_be64(to);
276 281
277 __blk_add_trace(bt, from, bio->bi_size, bio->bi_rw, BLK_TA_REMAP, !bio_flagged(bio, BIO_UPTODATE), sizeof(r), &r); 282 __blk_add_trace(bt, from, bio->bi_size, bio->bi_rw, BLK_TA_REMAP, !bio_flagged(bio, BIO_UPTODATE), sizeof(r), &r);
@@ -285,6 +290,7 @@ static inline void blk_add_trace_remap(struct request_queue *q, struct bio *bio,
285#define blk_add_trace_generic(q, rq, rw, what) do { } while (0) 290#define blk_add_trace_generic(q, rq, rw, what) do { } while (0)
286#define blk_add_trace_pdu_int(q, what, bio, pdu) do { } while (0) 291#define blk_add_trace_pdu_int(q, what, bio, pdu) do { } while (0)
287#define blk_add_trace_remap(q, bio, dev, f, t) do {} while (0) 292#define blk_add_trace_remap(q, bio, dev, f, t) do {} while (0)
293#define do_blk_trace_setup(q, bdev, buts) (-ENOTTY)
288#endif /* CONFIG_BLK_DEV_IO_TRACE */ 294#endif /* CONFIG_BLK_DEV_IO_TRACE */
289 295#endif /* __KERNEL__ */
290#endif 296#endif