[PATCH 0/7][RFC] Introduce fallocate query support mode

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

 



Hello,

this is a proposal, followed by implementation, of new fallocate flag I decided
to call "query support" (FALLOC_FL_QUERY_SUPPORT).

Currently there is not way to tell which subset of fallocate operations are
supported by any given file system, so users have to rely on "just knowing"
or trying if it works or not.

This patchset introduces the new FALLOC_FL_QUERY_SUPPORT fallocate mode
implements it in couple of file systems and takes advantage of this new flag in
loop driver where we can finally test specifically for punch hole (and zero
range) rather than just relying on mere existence of fallocate callback.

When FALLOC_FL_QUERY_SUPPORT mode is specified with offset and length set to
zero it returns bitmask with all fallocate mode flags supported for a given
file. Because of this I also had to introduce additional flag for the original
fallocate mode (preallocation: mode = 0).

I expect that in many file systems the implementation will be straightforward
and once we can agree on this I plan to implement this for other file systems
with fallocate support.

In ext4 (and this may be true for other file systems as well) supported modes
can differ from file to file depending on the features (like extents and
encryption). Because of that I decided to make it return all the modes supported
by the particular file, not file system. This might complicate implementation
for some file systems, however I think this will be beneficial.

Thoughts ?

Thanks!
-Lukas




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux