Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1185991

[PATCH v7 2/6] block: loop: set QUEUE_FLAG_NOMERGES for request queue of loop

From Ming Lei <ming.lei@canonical.com>
Newsgroups linux.kernel
Subject [PATCH v7 2/6] block: loop: set QUEUE_FLAG_NOMERGES for request queue of loop
Date 2015-07-16 17:40 +0200
Message-ID <pMTqs-2pX-63@gated-at.bofh.it> (permalink)
References <pMTqq-2pX-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


It doesn't make sense to enable merge because the I/O
submitted to backing file is handled page by page.

Signed-off-by: Ming Lei <ming.lei@canonical.com>
---
 drivers/block/loop.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index f7a4c9d..e4381f8 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1595,6 +1595,12 @@ static int loop_add(struct loop_device **l, int i)
 	}
 	lo->lo_queue->queuedata = lo;
 
+	/*
+	 * It doesn't make sense to enable merge because the I/O
+	 * submitted to backing file is handled page by page.
+	 */
+	queue_flag_set_unlocked(QUEUE_FLAG_NOMERGES, lo->lo_queue);
+
 	INIT_LIST_HEAD(&lo->write_cmd_head);
 	INIT_WORK(&lo->write_work, loop_queue_write_work);
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v7 0/6] block: loop: improve loop with AIO Ming Lei <ming.lei@canonical.com> - 2015-07-16 17:40 +0200
  [PATCH v7 5/6] block: loop: introduce ioctl command of LOOP_SET_DIRECT_IO Ming Lei <ming.lei@canonical.com> - 2015-07-16 17:40 +0200
  [PATCH v7 4/6] block: loop: prepare for supporing direct IO Ming Lei <ming.lei@canonical.com> - 2015-07-16 17:40 +0200
  [PATCH v7 2/6] block: loop: set QUEUE_FLAG_NOMERGES for request queue of loop Ming Lei <ming.lei@canonical.com> - 2015-07-16 17:40 +0200
  [PATCH v7 1/6] fs: direct-io: don't dirtying pages for ITER_BVEC/ITER_KVEC direct read Ming Lei <ming.lei@canonical.com> - 2015-07-16 17:40 +0200
    Re: [PATCH v7 1/6] fs: direct-io: don't dirtying pages for  ITER_BVEC/ITER_KVEC direct read Dave Kleikamp <dave.kleikamp@oracle.com> - 2015-07-16 18:50 +0200
  [PATCH v7 6/6] block: loop: support DIO & AIO Ming Lei <ming.lei@canonical.com> - 2015-07-16 17:40 +0200

csiph-web