Skip to content

Commit

Permalink
block: move req_set_nomerge to blk.h
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Jens Axboe <axboe@fb.com>
  • Loading branch information
Christoph Hellwig authored and axboe committed Feb 8, 2017
1 parent 80c6b15 commit 6cf7677
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 0 additions & 7 deletions block/blk-merge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions block/blk.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit 6cf7677

Please sign in to comment.