From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754772AbcAVULT (ORCPT ); Fri, 22 Jan 2016 15:11:19 -0500 Received: from mga03.intel.com ([134.134.136.65]:3284 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751250AbcAVULS (ORCPT ); Fri, 22 Jan 2016 15:11:18 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,332,1449561600"; d="scan'208";a="732521773" Date: Fri, 22 Jan 2016 20:11:17 +0000 From: Keith Busch To: Linus Torvalds Cc: Ming Lei , Jens Axboe , Linux Kernel Mailing List , linux-block@vger.kernel.org, Stefan Haberland Subject: Re: [PATCH] block: fix bio splitting on max sectors Message-ID: <20160122201116.GB21984@localhost.localdomain> References: <1453487372-8391-1-git-send-email-tom.leiming@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 22, 2016 at 10:43:59AM -0800, Linus Torvalds wrote: > On Fri, Jan 22, 2016 at 10:29 AM, Ming Lei wrote: > > > > This patch fixes the issue by making the max io size aligned > > to logical block size. > > Looks better, thanks. > > I'd suggest also moving the "max_sectors" variable into the > bio_for_each_segment() loop too just to keep variables with minimal > scope, but at least this is fairly legible. The value of max_sectors doesn't change in this function, so its calculation could be done just once instead of with each segment iteration. Other than that, thanks Ming, the fix looks good to me. Third try's a charm?