summaryrefslogtreecommitdiff
path: root/kernel/trace
diff options
context:
space:
mode:
authorMike Christie <mchristi@redhat.com>2016-06-05 14:32:23 -0500
committerJens Axboe <axboe@fb.com>2016-06-07 13:41:38 -0600
commit3a5e02ced11e22ecd9da3d6710afe15bcfee1d10 (patch)
tree78f6d1a737b01b559b61310b9355f1f7ecfdd54c /kernel/trace
parent4e1b2d52a80d79296a5d899d73249748dea71a53 (diff)
block, drivers: add REQ_OP_FLUSH operation
This adds a REQ_OP_FLUSH operation that is sent to request_fn based drivers by the block layer's flush code, instead of sending requests with the request->cmd_flags REQ_FLUSH bit set. Signed-off-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/blktrace.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 2d16fad519b2..0c70fbb6ea8d 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -223,6 +223,8 @@ static void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes,
what |= MASK_TC_BIT(op_flags, FUA);
if (op == REQ_OP_DISCARD)
what |= BLK_TC_ACT(BLK_TC_DISCARD);
+ if (op == REQ_OP_FLUSH)
+ what |= BLK_TC_ACT(BLK_TC_FLUSH);
pid = tsk->pid;
if (act_log_check(bt, what, sector, pid))
@@ -1788,6 +1790,9 @@ void blk_fill_rwbs(char *rwbs, int op, u32 rw, int bytes)
case REQ_OP_DISCARD:
rwbs[i++] = 'D';
break;
+ case REQ_OP_FLUSH:
+ rwbs[i++] = 'F';
+ break;
case REQ_OP_READ:
rwbs[i++] = 'R';
break;