aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/blktrace_api.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-10 18:22:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-10 18:22:42 -0400
commit2f9e825d3e0e2b407ae8f082de5c00afcf7378fb (patch)
treef8b3ee40674ce4acd5508a0a0bf52a30904caf6c /include/linux/blktrace_api.h
parent7ae0dea900b027cd90e8a3e14deca9a19e17638b (diff)
parentde75d60d5ea235e6e09f4962ab22541ce0fe176a (diff)
Merge branch 'for-2.6.36' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.36' of git://git.kernel.dk/linux-2.6-block: (149 commits) block: make sure that REQ_* types are seen even with CONFIG_BLOCK=n xen-blkfront: fix missing out label blkdev: fix blkdev_issue_zeroout return value block: update request stacking methods to support discards block: fix missing export of blk_types.h writeback: fix bad _bh spinlock nesting drbd: revert "delay probes", feature is being re-implemented differently drbd: Initialize all members of sync_conf to their defaults [Bugz 315] drbd: Disable delay probes for the upcomming release writeback: cleanup bdi_register writeback: add new tracepoints writeback: remove unnecessary init_timer call writeback: optimize periodic bdi thread wakeups writeback: prevent unnecessary bdi threads wakeups writeback: move bdi threads exiting logic to the forker thread writeback: restructure bdi forker loop a little writeback: move last_active to bdi writeback: do not remove bdi from bdi_list writeback: simplify bdi code a little writeback: do not lose wake-ups in bdi threads ... Fixed up pretty trivial conflicts in drivers/block/virtio_blk.c and drivers/scsi/scsi_error.c as per Jens.
Diffstat (limited to 'include/linux/blktrace_api.h')
-rw-r--r--include/linux/blktrace_api.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h
index 416bf62d6d46..3395cf7130f5 100644
--- a/include/linux/blktrace_api.h
+++ b/include/linux/blktrace_api.h
@@ -5,6 +5,7 @@
5#ifdef __KERNEL__ 5#ifdef __KERNEL__
6#include <linux/blkdev.h> 6#include <linux/blkdev.h>
7#include <linux/relay.h> 7#include <linux/relay.h>
8#include <linux/compat.h>
8#endif 9#endif
9 10
10/* 11/*
@@ -220,11 +221,26 @@ static inline int blk_trace_init_sysfs(struct device *dev)
220 221
221#endif /* CONFIG_BLK_DEV_IO_TRACE */ 222#endif /* CONFIG_BLK_DEV_IO_TRACE */
222 223
224#ifdef CONFIG_COMPAT
225
226struct compat_blk_user_trace_setup {
227 char name[32];
228 u16 act_mask;
229 u32 buf_size;
230 u32 buf_nr;
231 compat_u64 start_lba;
232 compat_u64 end_lba;
233 u32 pid;
234};
235#define BLKTRACESETUP32 _IOWR(0x12, 115, struct compat_blk_user_trace_setup)
236
237#endif
238
223#if defined(CONFIG_EVENT_TRACING) && defined(CONFIG_BLOCK) 239#if defined(CONFIG_EVENT_TRACING) && defined(CONFIG_BLOCK)
224 240
225static inline int blk_cmd_buf_len(struct request *rq) 241static inline int blk_cmd_buf_len(struct request *rq)
226{ 242{
227 return blk_pc_request(rq) ? rq->cmd_len * 3 : 1; 243 return (rq->cmd_type == REQ_TYPE_BLOCK_PC) ? rq->cmd_len * 3 : 1;
228} 244}
229 245
230extern void blk_dump_cmd(char *buf, struct request *rq); 246extern void blk_dump_cmd(char *buf, struct request *rq);