From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752390AbbJNDbL (ORCPT ); Tue, 13 Oct 2015 23:31:11 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:33051 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751914AbbJNDbD (ORCPT ); Tue, 13 Oct 2015 23:31:03 -0400 From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: Ming Lin , Kent Overstreet , Christoph Hellwig , Ming Lei Subject: [PATCH 2/4] block: avoid to merge splitted bio Date: Wed, 14 Oct 2015 11:30:46 +0800 Message-Id: <1444793448-9994-3-git-send-email-ming.lei@canonical.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1444793448-9994-1-git-send-email-ming.lei@canonical.com> References: <1444793448-9994-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. 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