summaryrefslogtreecommitdiffstats
path: root/block/blk-merge.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2016-06-09 16:00:36 +0200
committerJens Axboe <axboe@fb.com>2016-06-09 09:52:25 -0600
commit288dab8a35a0bde426a09870943c8d3ee3a50dab (patch)
tree483fd3eb60ff8f44d149fb28d3b79e5212645104 /block/blk-merge.c
parent56332f02a562390a3198525ad78cb4f558805c0f (diff)
downloadlinux-0-day-288dab8a35a0bde426a09870943c8d3ee3a50dab.tar.gz
linux-0-day-288dab8a35a0bde426a09870943c8d3ee3a50dab.tar.xz
block: add a separate operation type for secure erase
Instead of overloading the discard support with the REQ_SECURE flag. Use the opportunity to rename the queue flag as well, and remove the dead checks for this flag in the RAID 1 and RAID 10 drivers that don't claim support for secure erase. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-merge.c')
-rw-r--r--block/blk-merge.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c
index c265348b75d1a..9772308a83918 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -649,8 +649,7 @@ static int attempt_merge(struct request_queue *q, struct request *req,
if (!rq_mergeable(req) || !rq_mergeable(next))
return 0;
- if (!blk_check_merge_flags(req->cmd_flags, req_op(req), next->cmd_flags,
- req_op(next)))
+ if (req_op(req) != req_op(next))
return 0;
/*
@@ -752,8 +751,7 @@ bool blk_rq_merge_ok(struct request *rq, struct bio *bio)
if (!rq_mergeable(rq) || !bio_mergeable(bio))
return false;
- if (!blk_check_merge_flags(rq->cmd_flags, req_op(rq), bio->bi_rw,
- bio_op(bio)))
+ if (req_op(rq) != bio_op(bio))
return false;
/* different data direction or already started, don't merge */