RFC Introduce fallocate query support mode
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest7 patches 18 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | vfs: Introduce fallocate query support modefs/ include/ include/ | +33 | 0 replies | |
| 2/7 | ext4: Implement fallocate query support modefs/ fs/ | +29 | 0 replies | |
| 3/7 | ext4: Remove unnecessary S_ISREG checks in fallocate operationsfs/ fs/ | +0 | 0 replies | |
| 4/7 | xfs: Implement fallocate query support modefs/ | +5 | 18 replies | |
| 5/7 | fat: Implement fallocate query support modefs/ fs/ | +10 | 0 replies | |
| 6/7 | gfs2: Implement fallocate query support modefs/ | +17 | 0 replies | |
| 7/7 | loop: Check for puch hole and zero range support specificallydrivers/ | +43 | 0 replies |
Reviews trailers per patch
1 of 7 patches has a Reviewed-by or Acked-by.
| Patch | OGAWA Hirofumi |
|---|---|
| 1/7 | |
| 2/7 | |
| 3/7 | |
| 4/7 | A-b |
| 5/7 | |
| 6/7 | |
| 7/7 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/7][RFC] Introduce fallocate query support mode
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