From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753471AbbJOPPs (ORCPT ); Thu, 15 Oct 2015 11:15:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53158 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752255AbbJOPPr (ORCPT ); Thu, 15 Oct 2015 11:15:47 -0400 From: Jeff Moyer To: Ming Lei Cc: Jens Axboe , linux-kernel@vger.kernel.org, Ming Lin , Kent Overstreet , Christoph Hellwig Subject: Re: [PATCH 2/4] block: avoid to merge splitted bio References: <1444793448-9994-1-git-send-email-ming.lei@canonical.com> <1444793448-9994-3-git-send-email-ming.lei@canonical.com> X-PGP-KeyID: 1F78E1B4 X-PGP-CertKey: F6FE 280D 8293 F72C 65FD 5A58 1FF8 A7CA 1F78 E1B4 X-PCLoadLetter: What the f**k does that mean? Date: Thu, 15 Oct 2015 11:15:45 -0400 In-Reply-To: <1444793448-9994-3-git-send-email-ming.lei@canonical.com> (Ming Lei's message of "Wed, 14 Oct 2015 11:30:46 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ming Lei writes: > The splitted bio has been already too fat to merge, so mark it > as NOMERGE. > > Signed-off-by: Ming Lei Reviewed-by: Jeff Moyer > --- > 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;