From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754821AbbJ1AOL (ORCPT ); Tue, 27 Oct 2015 20:14:11 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:35512 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753909AbbJ1AOG (ORCPT ); Tue, 27 Oct 2015 20:14:06 -0400 Subject: Re: block: re-add discard_granularity and alignment checks To: Ming Lin , Mike Snitzer References: <1445533182.16385.10.camel@ssi> <20151022170310.GA12038@redhat.com> Cc: lkml , Christoph Hellwig , "Martin K. Petersen" , Kent Overstreet From: Jens Axboe Message-ID: <56301347.9090701@kernel.dk> Date: Wed, 28 Oct 2015 09:13:59 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/28/2015 06:23 AM, Ming Lin wrote: > On Thu, Oct 22, 2015 at 10:03 AM, Mike Snitzer wrote: >> On Thu, Oct 22 2015 at 12:59pm -0400, >> Ming Lin wrote: >> >>> From: Ming Lin >>> >>> In commit b49a087("block: remove split code in >>> blkdev_issue_{discard,write_same}"), discard_granularity and alignment >>> checks were removed. Ideally, with bio late splitting, the upper layers >>> shouldn't need to depend on device's limits. >>> >>> Christoph reported a discard regression on the HGST Ultrastar SN100 NVMe >>> device when mkfs.xfs. We have not found the root cause yet. >>> >>> This patch re-adds discard_granularity and alignment checks by reverting >>> the related changes in commit b49a087. The good thing is now we can >>> remove the 2G discard size cap and just use UINT_MAX to avoid bi_size >>> overflow. >>> >>> Reviewed-by: Christoph Hellwig >>> Tested-by: Christoph Hellwig >>> Signed-off-by: Ming Lin >> >> Reviewed-by: Mike Snitzer > > Hi Jens, > > Would you please take this one? I was going to add it for 4.3, but hch just pointed out that it's a regression in this series. I'll send it in for 4.3. -- Jens Axboe