From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751687AbdIUB3x (ORCPT ); Wed, 20 Sep 2017 21:29:53 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:52326 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751436AbdIUB3v (ORCPT ); Wed, 20 Sep 2017 21:29:51 -0400 Date: Wed, 20 Sep 2017 18:29:49 -0700 From: Christoph Hellwig To: Jianchao Wang Cc: Jens Axboe , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] block: consider merge of segments when merge bio into rq Message-ID: <20170921012949.GA29873@infradead.org> References: <1505517709-2478-1-git-send-email-jianchao.w.wang@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1505517709-2478-1-git-send-email-jianchao.w.wang@oracle.com> User-Agent: Mutt/1.8.3 (2017-05-23) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org So the check change here looks good to me. I don't like like the duplicate code, can you look into sharing the new segment checks between the two functions and the existing instance in ll_merge_requests_fn by passing say two struct bio *bio1 and struct bio *bio2 pointer instead of using req->bio and req->biotail? Also please include the information that you posted in the reply to the other patch in the description for this one.