coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: new snapshot available: coreutils-8.11.9-8c0b1d


From: Eric Blake
Subject: Re: new snapshot available: coreutils-8.11.9-8c0b1d
Date: Thu, 21 Apr 2011 16:33:15 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.9

On 04/21/2011 03:12 PM, Markus Trippelsdorf wrote:
> On 2011.04.21 at 22:09 +0200, Jim Meyering wrote:
>> Considering the potential for data loss when using coreutils-8.11 on
>> ext4 and xfs when using e.g., 2.6.39-rc3[*], here's a snapshot that will
>> soon become coreutils-8.12.  Please give it a try.
> 
> Looks good. The "files full of zeros" problem is gone and all 367 tests
> pass.
> 
> The first (tiny) steps for SEEK_HOLE and SEEK_DATA support were just
> posted: http://thread.gmane.org/gmane.linux.kernel/1129696

Thanks for that pointer.

Here's hoping that the kernel implements the same documented semantics
as Solaris:

SEEK_HOLE - returns the offset of the next hole without repositioning
the file (all files have a virtual hole after the last data byte, so the
only time this fails is with ENXIO if you seek relative to an offset
beyond the end of the file).

SEEK_DATA - move the pointer to the start of the next non-hole, or fail
with ENXIO if there are no data sections after the requested position.

Typical usage would then be a loop of:

lseek(SEEK_HOLE) to learn where the next hole starts, and process all
bytes from current position to that point
lseek(SEEK_DATA) to skip past the hole that you just arrived at, where
ENXIO tells you you reached the end of the file.

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]