[Top] [All Lists]

Re: [PATCH] xfstests 255: add a seek_data/seek_hole tester

To: Sunil Mushran <sunil.mushran@xxxxxxxxxx>
Subject: Re: [PATCH] xfstests 255: add a seek_data/seek_hole tester
From: Pádraig Brady <P@xxxxxxxxxxxxxx>
Date: Wed, 31 Aug 2011 10:05:21 +0100
Cc: Dave Chinner <david@xxxxxxxxxxxxx>, Andreas Dilger <adilger@xxxxxxxxx>, Christoph Hellwig <hch@xxxxxxxxxxxxx>, Josef Bacik <josef@xxxxxxxxxx>, linux-fsdevel@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-btrfs@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx, viro@xxxxxxxxxxxxxxxxxx, dchinner@xxxxxxxxxx
In-reply-to: <4E5DBBFD.5020202@xxxxxxxxxx>
References: <1309275199-10801-1-git-send-email-josef@xxxxxxxxxx> <1309275199-10801-5-git-send-email-josef@xxxxxxxxxx> <20110825060632.GA9933@xxxxxxxxxxxxx> <20110825064039.GO3162@dastard> <0A267E55-7772-438D-B6A7-89B73020F311@xxxxxxxxx> <20110826013528.GW3162@dastard> <4E5D8B8E.8030401@xxxxxxxxxx> <20110831032932.GI32358@dastard> <4E5DBBFD.5020202@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0
On 08/31/2011 05:43 AM, Sunil Mushran wrote:
> On 8/30/2011 8:29 PM, Dave Chinner wrote:
>> And that's -exactly- the ambiguous, vague definition that has raised
>> all these questions in the first place. I was in doubt about whether
>> unwritten extents can be considered a hole, and by your definition
>> that means it should be data. But Andreas seems to be in no doubt it
>> should be considered a hole.
> Fair enough. Let me rephrase.
> Data:
> A range in a file when read could return something other than nulls.
> Hole:
> A range in a file when read only returns nulls.
> Considering preallocated extents only return null, they should
> be considered holes.

I would concur with this.
Treating preallocated extents as holes will allow them to be
processed quickly by `cp` etc.

What we lose is the ability to copy the allocation from src to dst.
But that's less important in comparison, and could probably be done
on a per file rather than per extent basis anyway.
Note preallocation would be good for disk layout and timely ENOSPC.

Note fiemap gives us greater control by distinguishing
holes and empty extents, thus allowing us to both
efficiently copy and maintain allocation.  But that
interface currently requires a sync of the file on some
file systems, which we couldn't enable for performance
reasons in cp.


<Prev in Thread] Current Thread [Next in Thread>