From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org
Subject: [PATCH 1/4] block: move req_set_nomerge to blk.h
Date: Tue, 7 Feb 2017 17:46:55 +0100 [thread overview]
Message-ID: <20170207164658.32449-2-hch@lst.de> (raw)
In-Reply-To: <20170207164658.32449-1-hch@lst.de>
This makes it available outside of blk-merge.c, and inlining such a trivial
helper seems pretty useful to start with.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
block/blk-merge.c | 7 -------
block/blk.h | 7 +++++++
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/block/blk-merge.c b/block/blk-merge.c
index a373416dbc9a..c956d9e7aafd 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -482,13 +482,6 @@ int blk_rq_map_sg(struct request_queue *q, struct request *rq,
}
EXPORT_SYMBOL(blk_rq_map_sg);
-static void req_set_nomerge(struct request_queue *q, struct request *req)
-{
- req->cmd_flags |= REQ_NOMERGE;
- if (req == q->last_merge)
- q->last_merge = NULL;
-}
-
static inline int ll_new_hw_segment(struct request_queue *q,
struct request *req,
struct bio *bio)
diff --git a/block/blk.h b/block/blk.h
index 4972b98d47e1..3e08703902a9 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -256,6 +256,13 @@ static inline int blk_do_io_stat(struct request *rq)
!blk_rq_is_passthrough(rq);
}
+static inline void req_set_nomerge(struct request_queue *q, struct request *req)
+{
+ req->cmd_flags |= REQ_NOMERGE;
+ if (req == q->last_merge)
+ q->last_merge = NULL;
+}
+
/*
* Internal io_context interface
*/
--
2.11.0
next prev parent reply other threads:[~2017-02-07 16:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-07 16:46 support for multi-range discard requests Christoph Hellwig
2017-02-07 16:46 ` Christoph Hellwig [this message]
2017-02-15 10:29 ` [PATCH 1/4] block: move req_set_nomerge to blk.h Sagi Grimberg
2017-02-07 16:46 ` [PATCH 2/4] block: enumify ELEVATOR_*_MERGE Christoph Hellwig
2017-02-15 10:31 ` Sagi Grimberg
2017-02-07 16:46 ` [PATCH 3/4] block: optionally merge discontiguous discard bios into a single request Christoph Hellwig
2017-02-08 10:54 ` Ming Lei
2017-02-08 11:57 ` Christoph Hellwig
2017-02-15 10:36 ` Sagi Grimberg
2017-02-07 16:46 ` [PATCH 4/4] nvme: support ranged discard requests Christoph Hellwig
2017-02-07 18:34 ` Keith Busch
2017-02-07 19:34 ` Christoph Hellwig
2017-02-15 10:42 ` Sagi Grimberg
-- strict thread matches above, loose matches on Subject: below --
2017-02-08 13:13 support for multi-range discard requests V2 Christoph Hellwig
2017-02-08 13:13 ` [PATCH 1/4] block: move req_set_nomerge to blk.h Christoph Hellwig
2017-02-08 13:46 support for multi-range discard requests V3 Christoph Hellwig
2017-02-08 13:46 ` [PATCH 1/4] block: move req_set_nomerge to blk.h Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170207164658.32449-2-hch@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox