[lug] File size limit issue

Aaron Crane aaron.crane at pobox.com
Sun Nov 19 16:25:16 MST 2000

"Anders Knudsen" <andersk at uswest.net> writes:
> From other info I found hunting this weekend, ext2 does support LFS.

That's good to hear (though I note that this does not apply for stock 2.2.x

> I may try recompiling dd or samba to see if I can get it to do larger
> files.  From http://www.scyld.com/software/lfs.html it looks like if I use
> _FILE_OFFSET_BITS 64 that would do the trick.

If the code was well written, it's possible that compiling with
_FILE_OFFSET_BITS=64 will magically turn it into an LFS-aware program.
However, verifying that ought to involve a full audit of the code, which
might be somewhat time-consuming.  I've never looked at the code for either
dd or Samba, so I can't say how much work would be involved.

One other issue: you can't portably use printf or scanf functions on off64_t
values (or, equivalently, on off_t values in programs compiled with
_FILE_OFFSET_BITS=64).  (You can mostly rely on constructs like "%lld", but
this hasn't quite been standardised yet.)  This may or may not be a problem
for the programs in question.

Aaron Crane   <aaron.crane at pobox.com>   <URL:http://pobox.com/~aaronc/>

More information about the LUG mailing list