From mboxrd@z Thu Jan 1 00:00:00 1970 From: Theodore Tso Subject: Re: [PATCH 1/4] vfs: vfs-level fiemap interface Date: Tue, 7 Oct 2008 09:48:14 -0400 Message-ID: <20081007134814.GA7311@mit.edu> References: <1223071147-27180-1-git-send-email-tytso@mit.edu> <1223071147-27180-2-git-send-email-tytso@mit.edu> <20081004021251.GA29174@mit.edu> <48EA55AC.2060102@hp.com> <20081006210706.GB8139@mit.edu> <20081007101207.GA10406@infradead.org> <20081007130008.GA3503@shareable.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , jim owens , linux-fsdevel@vger.kernel.org, Mark Fasheh , Michael Kerrisk , linux-abi@vger.kernel.org To: Jamie Lokier Return-path: Received: from www.church-of-our-saviour.org ([69.25.196.31]:53323 "EHLO thunker.thunk.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752983AbYJGNsX (ORCPT ); Tue, 7 Oct 2008 09:48:23 -0400 Content-Disposition: inline In-Reply-To: <20081007130008.GA3503@shareable.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Oct 07, 2008 at 02:00:08PM +0100, Jamie Lokier wrote: > Shared blocks must not be overwritten to the block device when > unmounted - but they might be safe to *read*, e.g. by LILO. > > Shared data is not the only situation where it's unsafe to overwrite > blocks in place but they can be read: anything wich data-dependent > metadata, such as checksums, data version numbers or indexing. > > FIEMAP_EXTENT_READ_ENCODED > FIEMAP_EXTENT_WRITE_ENCODED > Um, sure, but are there potential users for FIEMAP that would want to update a file in place while the filesystem is unmounted? I've always considered the flag (despite its many names) FIEMAP_EXTENT_ENCODED as only giving permission to read from a particular block. You're correct that just because you can read from a particular block doesn't mean that can safely update it in place. But I never imagined that it would be good and useful for the FIEMAP interface to give permission to an application to be able to update a file in place while the filesystem is unmounted. If some application which wishes to use FIEMAP really wants to know whether it's safe to write to an extent while the fs is unmounted, we can add that flag later --- but I'm not that sure we really want to go there. Do you have a use in mind for this interface where this would be useful? Regards, - Ted