| To: | linux-f2fs-devel@xxxxxxxxxxxxxxxxxxxxx, linux-ext4@xxxxxxxxxxxxxxx, konrad.wilk@xxxxxxxxxx, drbd-dev@xxxxxxxxxxxxxxxx, philipp.reisner@xxxxxxxxxx, lars.ellenberg@xxxxxxxxxx, linux-raid@xxxxxxxxxxxxxxx, dm-devel@xxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-bcache@xxxxxxxxxxxxxxx, linux-block@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, linux-mtd@xxxxxxxxxxxxxxxxxxx, target-devel@xxxxxxxxxxxxxxx, linux-btrfs@xxxxxxxxxxxxxxx, osd-dev@xxxxxxxxxxxx, xfs@xxxxxxxxxxx, ocfs2-devel@xxxxxxxxxxxxxx |
|---|---|
| Subject: | [PATCH 30/45] block: copy bio op to request op |
| From: | mchristi@xxxxxxxxxx |
| Date: | Sun, 5 Jun 2016 14:32:10 -0500 |
| Cc: | Mike Christie <mchristi@xxxxxxxxxx> |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <1465155145-10812-1-git-send-email-mchristi@xxxxxxxxxx> |
| References: | <1465155145-10812-1-git-send-email-mchristi@xxxxxxxxxx> |
From: Mike Christie <mchristi@xxxxxxxxxx>
The bio users should now always be setting up the bio op. This patch
has the block layer copy that to the request.
Signed-off-by: Mike Christie <mchristi@xxxxxxxxxx>
---
block/blk-core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index 7e943dc..3c45254 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -2976,8 +2976,7 @@ EXPORT_SYMBOL_GPL(__blk_end_request_err);
void blk_rq_bio_prep(struct request_queue *q, struct request *rq,
struct bio *bio)
{
- /* Bit 0 (R/W) is identical in rq->cmd_flags and bio->bi_rw */
- rq->cmd_flags |= bio->bi_rw & REQ_WRITE;
+ req_set_op(rq, bio_op(bio));
if (bio_has_data(bio))
rq->nr_phys_segments = bio_phys_segments(q, bio);
@@ -3062,7 +3061,8 @@ EXPORT_SYMBOL_GPL(blk_rq_unprep_clone);
static void __blk_rq_prep_clone(struct request *dst, struct request *src)
{
dst->cpu = src->cpu;
- dst->cmd_flags |= (src->cmd_flags & REQ_CLONE_MASK) | REQ_NOMERGE;
+ req_set_op_attrs(dst, req_op(src),
+ (src->cmd_flags & REQ_CLONE_MASK) | REQ_NOMERGE);
dst->cmd_type = src->cmd_type;
dst->__sector = blk_rq_pos(src);
dst->__data_len = blk_rq_bytes(src);
--
2.7.2
|
| Previous by Date: | [PATCH 29/45] xen: use bio op accessors, mchristi |
|---|---|
| Next by Date: | [PATCH 31/45] block: prepare request creation/destruction code to use REQ_OPs, mchristi |
| Previous by Thread: | [PATCH 29/45] xen: use bio op accessors, mchristi |
| Next by Thread: | [PATCH 31/45] block: prepare request creation/destruction code to use REQ_OPs, mchristi |
| Indexes: | [Date] [Thread] [Top] [All Lists] |