Re: an interface for filesystem preallocation that doesn't suck?

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

 



Rahul Sundaram wrote:
> Eric Sandeen wrote:
>> James Ralston wrote:
>>
>>> If the latter, is there an interface for fallocate() that doesn't have
>>> quite as much FAIL as posix_fallocate()?
>> yes, plain ol' fallocate(2), I think:
>>
>>        #include <linux/falloc.h>
>>
>>        long fallocate(int fd, int mode, loff_t offset, loff_t len);
>>
>> but you need a very recent glibc to get it:
>>
>> http://sourceware.org/bugzilla/show_bug.cgi?id=7083#c1
>>
>> it'd be great if we could get that into F11...
>>
>> BTW, ext4, xfs, btrfs, and ocfs2 all support ->fallocate.
> 
> Shouldn't we getting the new glibc and file RFE's against RPM, the
> torrent clients etc?

Ah, just checked and it's already in our rawhide glibc, yay :)  didn't
realize that.

http://sandeen.fedorapeople.org/utilities/fallocate.c

is a simple tool to exercise it, FWIW.

One caveat:  ext4 doesn't always coalesce extents, so preallocating for,
say, bittorent won't necessarily get ext4 down to tracking a single
extent; in my testing it can still have thousands of extents tracked by
the filesystem even if they are adjacent/contiguous.  :(  I hope to fix
that.  It's still worth doing though; a thousand adjacent extents is
better than a thousand discontiguous extents.

-Eric

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux