homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jcea
Recipients jcea
Date 2010年10月19日.03:15:15
SpamBayes Score 2.4210753e-08
Marked as misclassified No
Message-id <1287458119.59.0.0883351132174.issue10142@psf.upfronthosting.co.za>
In-reply-to
Content
ZFS supports SEEK_HOLE/SEEK_DATA in "lseek()" syscall.
Oracle Solaris man page por "lseek":
"""
[...]
 o If whence is SEEK_HOLE, the offset of the start of the
 next hole greater than or equal to the supplied offset
 is returned. The definition of a hole is provided near
 the end of the DESCRIPTION.
 o If whence is SEEK_DATA, the file pointer is set to the
 start of the next non-hole file region greater than or
 equal to the supplied offset.
 The symbolic constants SEEK_SET, SEEK_CUR, SEEK_END,
 SEEK_HOLE, and SEEK_DATA are defined in the header
 <unistd.h>.
[...]
 A "hole" is defined as a contiguous range of bytes in a
 file, all having the value of zero, but not all zeros in a
 file are guaranteed to be represented as holes returned with
 SEEK_HOLE. Filesystems are allowed to expose ranges of zeros
 with SEEK_HOLE, but not required to. Applications can use
 SEEK_HOLE to optimise their behavior for ranges of zeros,
 but must not depend on it to find all such ranges in a file.
 The existence of a hole at the end of every data region
 allows for easy programming and implies that a virtual hole
 exists at the end of the file. Applications should use
 fpathconf(_PC_MIN_HOLE_SIZE) or pathconf(_PC_MIN_HOLE_SIZE)
 to determine if a filesystem supports SEEK_HOLE. See fpath-
 conf(2).
 For filesystems that do not supply information about holes,
 the file will be represented as one entire data region.
"""
Implementation would be trivial. Simply conditionally compile the constant export in the C module. Or adopt the approach in the last phrase.
Any novice?.
History
Date User Action Args
2010年10月19日 03:15:19jceasetrecipients: + jcea
2010年10月19日 03:15:19jceasetmessageid: <1287458119.59.0.0883351132174.issue10142@psf.upfronthosting.co.za>
2010年10月19日 03:15:16jcealinkissue10142 messages
2010年10月19日 03:15:15jceacreate

AltStyle によって変換されたページ (->オリジナル) /