From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757922AbcAYS1j (ORCPT ); Mon, 25 Jan 2016 13:27:39 -0500 Received: from mail-ob0-f178.google.com ([209.85.214.178]:35985 "EHLO mail-ob0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753549AbcAYS1h (ORCPT ); Mon, 25 Jan 2016 13:27:37 -0500 Subject: Re: [PATCH v1] block: fix bio splitting on max sectors To: Stefan Haberland , Ming Lei , linux-kernel@vger.kernel.org References: <1453507533-25593-1-git-send-email-tom.leiming@gmail.com> <56A2F70E.2070802@kernel.dk> <56A62DA7.8050506@linux.vnet.ibm.com> Cc: linux-block@vger.kernel.org, Linus Torvalds , Keith Busch From: Jens Axboe Message-ID: <56A66916.4080707@kernel.dk> Date: Mon, 25 Jan 2016 11:27:34 -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: <56A62DA7.8050506@linux.vnet.ibm.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/25/2016 07:13 AM, Stefan Haberland wrote: > Am 23.01.2016 um 04:44 schrieb Jens Axboe: >> 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. >> > > I applied the patch and it seems to work for DASD devices. I will do > some more testing but for me it looks OK. Thanks for testing, Stefan. It'll go into mainline pretty soon. -- Jens Axboe