[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200116101612.GB16435@lst.de>
Date: Thu, 16 Jan 2020 11:16:12 +0100
From: Christoph Hellwig <hch@....de>
To: Andreas Dilger <adilger@...ger.ca>
Cc: David Howells <dhowells@...hat.com>,
Christoph Hellwig <hch@....de>,
Qu Wenruo <quwenruo.btrfs@....com>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Al Viro <viro@...iv.linux.org.uk>,
"Theodore Y. Ts'o" <tytso@....edu>,
"Darrick J. Wong" <darrick.wong@...cle.com>,
Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
David Sterba <dsterba@...e.com>,
linux-ext4 <linux-ext4@...r.kernel.org>,
linux-xfs <linux-xfs@...r.kernel.org>,
linux-btrfs <linux-btrfs@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Problems with determining data presence by examining extents?
On Wed, Jan 15, 2020 at 12:48:44PM -0700, Andreas Dilger wrote:
> I don't think either of those will be any better than FIEMAP, if the reason
> is that the underlying filesystem is filling in holes with actual data
> blocks to optimize the IO pattern. SEEK_HOLE would not find a hole in
> the block allocation, and would happily return the block of zeroes to
> the caller. Also, it isn't clear if SEEK_HOLE considers an allocated but
> unwritten extent to be a hole or a block?
It is supposed to treat unwritten extents that are not dirty as holes.
Note that fiemap can't even track the dirty state, so it will always give
you the wrong answer in some cases. And that is by design given that it
is a debug tool to give you the file system extent layout and can't be
used for data integrity purposes.
Powered by blists - more mailing lists