From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757672AbbJVRDN (ORCPT ); Thu, 22 Oct 2015 13:03:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42276 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753796AbbJVRDM (ORCPT ); Thu, 22 Oct 2015 13:03:12 -0400 Date: Thu, 22 Oct 2015 13:03:10 -0400 From: Mike Snitzer To: Ming Lin Cc: linux-kernel@vger.kernel.org, Christoph Hellwig , Jens Axboe , "Martin K. Petersen" , Kent Overstreet Subject: Re: block: re-add discard_granularity and alignment checks Message-ID: <20151022170310.GA12038@redhat.com> References: <1445533182.16385.10.camel@ssi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1445533182.16385.10.camel@ssi> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Thanks!