btrfs: uapi migration for user-visible API components
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest8 patches 10 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | btrfs: uapi/linux/btrfs.h migration, move BTRFS_LABEL_SIZEfs/ include/ | +1 | 1 reply | |
| 2/8 | btrfs: uapi/linux/btrfs.h migration, qgroup limit flagsfs/ include/ | +21 | 1 reply | |
| 3/8 | btrfs: uapi/linux/btrfs.h migration, document subvol flagsinclude/ | +14 | 1 reply | |
| 4/8 | btrfs: uapi/linux/btrfs.h migration, move feature flagsfs/ include/ | +31 | 1 reply | |
| 5/8 | btrfs: uapi/linux/btrfs.h migration, move balance flagsfs/ include/ | +64 | 1 reply | |
| 6/8 | btrfs: uapi/linux/btrfs.h migration, move struct btrfs_ioctl_defrag_range_argsfs/ include/ | +37 | 1 reply | |
| 7/8 | btrfs: uapi/linux/btrfs_tree.h migration, item types and definesfs/ include/ | +967 | 1 reply | |
| 8/8 | btrfs: uapi/linux/btrfs_tree.h, use __u8 and __u64include/ | +26 | 1 reply |
Reviews trailers per patch
All 8 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Liu Bo | Josef Bacik |
|---|---|---|
| Series | R-b | |
| 1/8 | R-b | |
| 2/8 | R-b | |
| 3/8 | R-b | |
| 4/8 | R-b | |
| 5/8 | R-b | |
| 6/8 | R-b | |
| 7/8 | R-b | |
| 8/8 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/8] btrfs: uapi migration for user-visible API components
commit 55e301fd57a (Btrfs: move fs/btrfs/ioctl.h to include/uapi/linux/btrfs.h) was intended to make the ioctl definitions available to userspace. Unfortunately, moving just that file wasn't enough and many of the ioctls aren't actually usable without the userspace programmer filling in the gaps. Specifically, for the routine ioctls like BTRFS_IOC_SETLABEL, BTRFS_LABEL_SIZE wasn't defined so the ioctl definition would be incomplete. We were also missing the argument structure for defrag. Beyond that, many of the ioctl structures have a flags field that may or may not be independent of the btrfs internals. Lastly, the SEARCH_TREE ioctl exposes all of the internal items of the tree to userspace programmers so the item structures should be exposed so that they can be parsed properly.
So, to make all this more convenient for consumers of these APIs, I've moved the flags used by the ioctl structures into btrfs.h and moved the item definitions, key IDs, tree root objectids, and other well-known objectids into a new btrfs_tree.h. ctree.h includes this new header directly, so there aren't any changes to .c files at all.
The only part of this set that isn't just a direct cut-and-paste is the last one which converts u8 and u64 values to __u8 and __u64 since the former aren't exported via include/uapi.
The goal is that everything required to use the btrfs ioctls for a particular kernel release should be made available by exporting the uapi headers for that release.
I intend to use these for the strace ioctl decoding patch I've been working on so that I don't need to duplicate of the definitions in the code I send upstream as the final version of the patch. Prior to this patchset, I had to duplicate nearly 100 defines and several structures -- and that's without doing any item decoding at all.
I do expect there might be some discussion here. :)
-Jeff
Jeff Mahoney (8):
btrfs: uapi/linux/btrfs.h migration, move BTRFS_LABEL_SIZE
btrfs: uapi/linux/btrfs.h migration, qgroup limit flags
btrfs: uapi/linux/btrfs.h migration, document subvol flags
btrfs: uapi/linux/btrfs.h migration, move feature flags
btrfs: uapi/linux/btrfs.h migration, move balance flags
btrfs: uapi/linux/btrfs.h migration, move struct
btrfs_ioctl_defrag_range_args
btrfs: uapi/linux/btrfs_tree.h migration, item types and defines
btrfs: uapi/linux/btrfs_tree.h, use __u8 and __u64
fs/btrfs/ctree.h | 1014 +-------------------------------------- fs/btrfs/volumes.h | 46 -- include/uapi/linux/btrfs.h | 173 ++++++- include/uapi/linux/btrfs_tree.h | 966 +++++++++++++++++++++++++++++++++++++ 4 files changed, 1135 insertions(+), 1064 deletions(-) create mode 100644 include/uapi/linux/btrfs_tree.h
Signature · 1 line
2.7.1