Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754726AbcCBJoW (ORCPT ); Wed, 2 Mar 2016 04:44:22 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:32894 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752046AbcCBJoU (ORCPT ); Wed, 2 Mar 2016 04:44:20 -0500 Date: Wed, 2 Mar 2016 01:44:16 -0800 From: Christoph Hellwig To: Arnd Bergmann Cc: "Darrick J. Wong" , axboe@kernel.dk, hch@infradead.org, akpm@linux-foundation.org, torvalds@linux-foundation.org, martin.petersen@oracle.com, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, shane.seymour@hpe.com, bfields@fieldses.org, linux-fsdevel@vger.kernel.org, jlayton@poochiereds.net Subject: Re: [PATCH v5.1 0/2] create BLKZEROOUT ioctl that invalidates page cache Message-ID: <20160302094416.GA16631@infradead.org> References: <20160302040932.16685.62789.stgit@birch.djwong.org> <1889689.0axyUkdxkf@wuerfel> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1889689.0axyUkdxkf@wuerfel> User-Agent: Mutt/1.5.24 (2015-08-30) 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: 543 Lines: 12 On Wed, Mar 02, 2016 at 10:15:02AM +0100, Arnd Bergmann wrote: > I'm missing the background on this, just saw the patch fly by, > so sorry if this has been asked before: > > Why do you want to invalidate the cache? Is this to save RAM > or is something else going to write here and you have to invalidate > it for correctness? BLKZEROOUT can be though as a direct I/O operation - it issues a WRITE SAME (or similar) command straight to the device to zero the specified range. If there was cached data for this range it would now be stale.