Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755936AbbLHCkW (ORCPT ); Mon, 7 Dec 2015 21:40:22 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:40394 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755267AbbLHCkV (ORCPT ); Mon, 7 Dec 2015 21:40:21 -0500 Date: Mon, 7 Dec 2015 18:40:15 -0800 From: Christoph Hellwig To: "Darrick J. Wong" Cc: Jens Axboe , Christoph Hellwig , "Seymour, Shane M" , "linux-kernel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-api@vger.kernel.org" , Jeff Layton , "J. Bruce Fields" , "martin.petersen@oracle.com" Subject: Re: [PATCH v4] block: create ioctl to discard-or-zeroout a range of blocks Message-ID: <20151208024015.GA18458@infradead.org> References: <20151113220143.GE2217@birch.djwong.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151113220143.GE2217@birch.djwong.org> 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: 1193 Lines: 23 On Fri, Nov 13, 2015 at 02:01:43PM -0800, Darrick J. Wong wrote: > Create a new ioctl to expose the block layer's newfound ability to > issue either a zeroing discard, a WRITE SAME with a zero page, or a > regular write with the zero page. This BLKZEROOUT2 ioctl takes > {start, length, flags} as parameters. So far, the only flag available > is to enable the zeroing discard part -- without it, the call invokes > the old BLKZEROOUT behavior. start and length have the same meaning > as in BLKZEROOUT. > > Furthermore, because BLKZEROOUT2 issues commands directly to the > storage device, we must invalidate the page cache (as a regular > O_DIRECT write would do) to avoid returning stale cache contents at a > later time. So does BLKZEROOUT. Seems like adding the cache invalidation should be one patch and the ioctl another one. Otherwise this looks fine except that I kinda hate BLKZEROOUT2 name, but can't come up with anything better. -- 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/