[Toybox] Reading/copying sparse files.

enh enh at google.com
Tue Aug 9 18:13:59 PDT 2016


fine by me. we haven't really cared about anything less than 3.4 for a
while. (we talk about maybe having better support for 2.x kernels, but
by the time we have nothing better to do than work on that, i suspect
they'll all be extinct anyway.)

On Tue, Aug 9, 2016 at 6:10 PM, Rob Landley <rob at landley.net> wrote:
> Judgement call: lseek(SEEK_HOLE) was added in commit 982d816581ee in
> 2011, which was in the run-up to the linux-3.0 release. So any 3.x
> kernel should have it, but 2.x kernels wouldn't.
>
> That's 5 years ago and my rule of thumb for expecting something to be
> ubiquitous is 7 years, but this is a useful feature I'd like to
> implement and don't really want a compile-time probe to config it out.
> (Nor do I want to use the older FIEMAP if I don't have to, which
> presumably won't work on network filesystems anyway.)
>
> I could also just say that any >4k run of zeroes counts as sparse,
> although that's probably more CPU intensive to implement...
>
> Rob
> _______________________________________________
> Toybox mailing list
> Toybox at lists.landley.net
> http://lists.landley.net/listinfo.cgi/toybox-landley.net



-- 
Elliott Hughes - http://who/enh - http://jessies.org/~enh/
Android native code/tools questions? Mail me/drop by/add me as a reviewer.


More information about the Toybox mailing list