From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755965AbcAWDoV (ORCPT ); Fri, 22 Jan 2016 22:44:21 -0500 Received: from mail-pf0-f174.google.com ([209.85.192.174]:33459 "EHLO mail-pf0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755861AbcAWDoS (ORCPT ); Fri, 22 Jan 2016 22:44:18 -0500 Subject: Re: [PATCH v1] block: fix bio splitting on max sectors To: Ming Lei , linux-kernel@vger.kernel.org References: <1453507533-25593-1-git-send-email-tom.leiming@gmail.com> Cc: linux-block@vger.kernel.org, Linus Torvalds , Stefan Haberland , Keith Busch From: Jens Axboe Message-ID: <56A2F70E.2070802@kernel.dk> Date: Fri, 22 Jan 2016 20:44:14 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1453507533-25593-1-git-send-email-tom.leiming@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/22/2016 05:05 PM, Ming Lei wrote: > After commit e36f62042880(block: split bios to maxpossible length), > bio can be splitted in the middle of a vector entry, then it > is easy to split out one bio which size isn't aligned with block > size, especially when the block size is bigger than 512. > > This patch fixes the issue by making the max io size aligned > to logical block size. > > Fixes: e36f62042880(block: split bios to maxpossible length) > Reported-by: Stefan Haberland > Cc: Keith Busch > Suggested-by: Linus Torvalds > Signed-off-by: Ming Lei > --- > V1: > - avoid double shift as suggested by Linus > - compute 'max_sectors' once as suggested by Keith This looks good to me, I'll apply and run a bit of local testing. -- Jens Axboe