aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-01-20 15:28:02 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-01-20 15:28:02 -0500
commite3737b9145636e884d7185176cbe76a3f2c645e2 (patch)
tree6975956beddec515ebaa2fa88ddb3812a6f421fa
parentcca112ecf259e24096bc18b736c3ae985e81ac72 (diff)
parentd61b7f972dab2a7d187c38254845546dfc8eed85 (diff)
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe: "Just two small fixes for this -rc. One is just killing an unused variable from Keith, but the other fixes a performance regression for nbd in this series, where we inadvertently flipped when we set MSG_MORE when outputting data" * 'for-linus' of git://git.kernel.dk/linux-block: nbd: only set MSG_MORE when we have more to send blk-mq: Remove unused variable
-rw-r--r--block/blk-mq.c1
-rw-r--r--drivers/block/nbd.c6
2 files changed, 2 insertions, 5 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index a8e67a155d04..c3400b5444a7 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -912,7 +912,6 @@ bool blk_mq_dispatch_rq_list(struct blk_mq_hw_ctx *hctx, struct list_head *list)
912static void blk_mq_process_rq_list(struct blk_mq_hw_ctx *hctx) 912static void blk_mq_process_rq_list(struct blk_mq_hw_ctx *hctx)
913{ 913{
914 LIST_HEAD(rq_list); 914 LIST_HEAD(rq_list);
915 LIST_HEAD(driver_list);
916 915
917 if (unlikely(blk_mq_hctx_stopped(hctx))) 916 if (unlikely(blk_mq_hctx_stopped(hctx)))
918 return; 917 return;
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 50a2020b5b72..9fd06eeb1a17 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -271,7 +271,7 @@ static inline int sock_send_bvec(struct nbd_device *nbd, int index,
271static int nbd_send_cmd(struct nbd_device *nbd, struct nbd_cmd *cmd, int index) 271static int nbd_send_cmd(struct nbd_device *nbd, struct nbd_cmd *cmd, int index)
272{ 272{
273 struct request *req = blk_mq_rq_from_pdu(cmd); 273 struct request *req = blk_mq_rq_from_pdu(cmd);
274 int result, flags; 274 int result;
275 struct nbd_request request; 275 struct nbd_request request;
276 unsigned long size = blk_rq_bytes(req); 276 unsigned long size = blk_rq_bytes(req);
277 struct bio *bio; 277 struct bio *bio;
@@ -310,7 +310,6 @@ static int nbd_send_cmd(struct nbd_device *nbd, struct nbd_cmd *cmd, int index)
310 if (type != NBD_CMD_WRITE) 310 if (type != NBD_CMD_WRITE)
311 return 0; 311 return 0;
312 312
313 flags = 0;
314 bio = req->bio; 313 bio = req->bio;
315 while (bio) { 314 while (bio) {
316 struct bio *next = bio->bi_next; 315 struct bio *next = bio->bi_next;
@@ -319,9 +318,8 @@ static int nbd_send_cmd(struct nbd_device *nbd, struct nbd_cmd *cmd, int index)
319 318
320 bio_for_each_segment(bvec, bio, iter) { 319 bio_for_each_segment(bvec, bio, iter) {
321 bool is_last = !next && bio_iter_last(bvec, iter); 320 bool is_last = !next && bio_iter_last(bvec, iter);
321 int flags = is_last ? 0 : MSG_MORE;
322 322
323 if (is_last)
324 flags = MSG_MORE;
325 dev_dbg(nbd_to_dev(nbd), "request %p: sending %d bytes data\n", 323 dev_dbg(nbd_to_dev(nbd), "request %p: sending %d bytes data\n",
326 cmd, bvec.bv_len); 324 cmd, bvec.bv_len);
327 result = sock_send_bvec(nbd, index, &bvec, flags); 325 result = sock_send_bvec(nbd, index, &bvec, flags);