aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/blktrace_api.h
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2008-08-10 06:21:57 -0400
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 02:56:01 -0400
commit27b29e86bf3d4b3cf6641a0efd78ed11a9b633b2 (patch)
tree0cfa20e8f07ee9d57e43a5371b4d97eeb8202081 /include/linux/blktrace_api.h
parentfdc53971bce56d299cb5f1f06ecbff30b34cbaf2 (diff)
blktrace: support discard requests
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux/blktrace_api.h')
-rw-r--r--include/linux/blktrace_api.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h
index d084b8d227a5..27da2cc682ee 100644
--- a/include/linux/blktrace_api.h
+++ b/include/linux/blktrace_api.h
@@ -21,6 +21,7 @@ enum blktrace_cat {
21 BLK_TC_NOTIFY = 1 << 10, /* special message */ 21 BLK_TC_NOTIFY = 1 << 10, /* special message */
22 BLK_TC_AHEAD = 1 << 11, /* readahead */ 22 BLK_TC_AHEAD = 1 << 11, /* readahead */
23 BLK_TC_META = 1 << 12, /* metadata */ 23 BLK_TC_META = 1 << 12, /* metadata */
24 BLK_TC_DISCARD = 1 << 13, /* discard requests */
24 25
25 BLK_TC_END = 1 << 15, /* only 16-bits, reminder */ 26 BLK_TC_END = 1 << 15, /* only 16-bits, reminder */
26}; 27};
@@ -195,6 +196,9 @@ static inline void blk_add_trace_rq(struct request_queue *q, struct request *rq,
195 if (likely(!bt)) 196 if (likely(!bt))
196 return; 197 return;
197 198
199 if (blk_discard_rq(rq))
200 rw |= (1 << BIO_RW_DISCARD);
201
198 if (blk_pc_request(rq)) { 202 if (blk_pc_request(rq)) {
199 what |= BLK_TC_ACT(BLK_TC_PC); 203 what |= BLK_TC_ACT(BLK_TC_PC);
200 __blk_add_trace(bt, 0, rq->data_len, rw, what, rq->errors, sizeof(rq->cmd), rq->cmd); 204 __blk_add_trace(bt, 0, rq->data_len, rw, what, rq->errors, sizeof(rq->cmd), rq->cmd);