[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] Feature request/suggestion: option to pre-allocate space
Re: [Bug-wget] Feature request/suggestion: option to pre-allocate space for files
Sat, 28 Jan 2012 14:40:24 +0100
Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)
> On Linux, fallocate() and posix_fallocate() can be used to pre-allocate
> space. The advantage of fallocate() is that, by using the
> FALLOC_FL_KEEP_SIZE flag, space is allocated but the apparent file size is
> unchanged. That means resuming with --continue works as normal.
> posix_fallocate() on the other hand, sets the file length to its full
> size, meaning that --continue won't work unless there were some way to
> specify the byte offset that wget should continue from.
would you like to send a patch which implements this? It should be
enabled only for those files that have a known file size (FTP or HTTP
with an explicit content-length header). I can't imagine of any
admissible heuristic that we can use when this information is missing.