[lkml]   [2011]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] xfstests 255: add a seek_data/seek_hole tester
    On Tue, Aug 30, 2011 at 11:29 PM, Dave Chinner <> wrote:
    > On Tue, Aug 30, 2011 at 06:17:02PM -0700, Sunil Mushran wrote:
    >> Instead
    >> we should let the fs weigh the cost of providing accurate information
    >> with the possible gain in performance.
    >> Data:
    >> A range in a file that could contain something other than nulls.
    >> If in doubt, it is data.
    >> Hole:
    >> A range in a file that only contains nulls.
    > 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.

    That's fine, though. Different filesystems have different abilities
    to recognize a data hole - FAT can't do it at all. Perhaps the
    requirements would be better stated in reverse: If the filesystem
    knows that a read() will return nulls (for whatever reason based on
    it's internal knowledge), it can report a hole. If it can't guarantee
    that, it's data. It's an absolute requirement that SEEK_DATA never
    miss data. SEEK_HOLE working is a nicety that userspace would
    appreciate - remember that the consumer here is cp(1), using it to
    skip empty portions of files and create sparse destination files.

     \ /
      Last update: 2011-08-31 06:51    [W:0.024 / U:0.084 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site