Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755300AbbG3Lgu (ORCPT ); Thu, 30 Jul 2015 07:36:50 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:34138 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755254AbbG3Lgq (ORCPT ); Thu, 30 Jul 2015 07:36:46 -0400 From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org, Dave Kleikamp Cc: Zach Brown , Christoph Hellwig , Maxim Patlasov , Andrew Morton , Alexander Viro , Tejun Heo , Dave Chinner , Ming Lei Subject: [PATCH v8 2/6] block: loop: set QUEUE_FLAG_NOMERGES for request queue of loop Date: Thu, 30 Jul 2015 07:36:20 -0400 Message-Id: <1438256184-23645-3-git-send-email-ming.lei@canonical.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438256184-23645-1-git-send-email-ming.lei@canonical.com> References: <1438256184-23645-1-git-send-email-ming.lei@canonical.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1019 Lines: 33 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 --- drivers/block/loop.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/block/loop.c b/drivers/block/loop.c index f9889b6..eee7510 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/