Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755561AbbKDLaW (ORCPT ); Wed, 4 Nov 2015 06:30:22 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:47992 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751470AbbKDLaV (ORCPT ); Wed, 4 Nov 2015 06:30:21 -0500 Date: Wed, 4 Nov 2015 03:30:19 -0800 From: Christoph Hellwig To: Jan Kara Cc: axboe@kernel.dk, LKML , linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] block: Don't allow illegal discard requests Message-ID: <20151104113019.GA24128@infradead.org> References: <1446628721-11030-1-git-send-email-jack@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1446628721-11030-1-git-send-email-jack@suse.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 865 Lines: 16 On Wed, Nov 04, 2015 at 10:18:41AM +0100, Jan Kara wrote: > Currently blkdev_issue_discard() doesn't check that submitted discard > request matches granularity required by the underlying device. > Submitting such requests to the device can have unexpected consequences > (e.g. brd driver just discards more / less data depending on how exactly > the request is aligned). So test that submitted discard request has the > granularity required by the driver. How is this going to work with stacked drivers? I think brd needs to be fixed to take care of the granularity itself, just like we did for request based drivers. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/