From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753046AbbJQPwv (ORCPT ); Sat, 17 Oct 2015 11:52:51 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:35220 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752903AbbJQPwt (ORCPT ); Sat, 17 Oct 2015 11:52:49 -0400 From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: Ming Lin , Kent Overstreet , Christoph Hellwig , Jeff Moyer , Ming Lei Subject: [PATCH v1 2/6] block: avoid to merge splitted bio Date: Sat, 17 Oct 2015 23:52:30 +0800 Message-Id: <1445097154-18229-3-git-send-email-ming.lei@canonical.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1445097154-18229-1-git-send-email-ming.lei@canonical.com> References: <1445097154-18229-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 The splitted bio has been already too fat to merge, so mark it as NOMERGE. Reviewed-by: Jeff Moyer Signed-off-by: Ming Lei --- block/blk-merge.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/blk-merge.c b/block/blk-merge.c index 22293fd..de5716d8 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -139,6 +139,9 @@ void blk_queue_split(struct request_queue *q, struct bio **bio, bio_set_flag(res, BIO_SEG_VALID); if (split) { + /* there isn't chance to merge the splitted bio */ + split->bi_rw |= REQ_NOMERGE; + bio_chain(split, *bio); generic_make_request(*bio); *bio = split; -- 1.9.1