All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/8] Add ioctl to support extended inode flags
@ 2018-05-09 13:54 David Sterba
  2018-05-09 13:54 ` [PATCH v2 1/8] btrfs: rename btrfs_update_iflags to reflect which flags it touches David Sterba
                   ` (7 more replies)
  0 siblings, 8 replies; 16+ messages in thread
From: David Sterba @ 2018-05-09 13:54 UTC (permalink / raw)
  To: linux-btrfs; +Cc: misono.tomohiro, David Sterba

Changes for v2:
 - dropped renaming of variable from patch "btrfs: rename
   btrfs_flags_to_ioctl to reflect which flags it touches"
 - fixed the error handling in "btrfs: add FS_IOC_FSSETXATTR ioctl"
 - new patch to unify naming of some local variables


I'm about to add this patchset to the main queue for 4.18, unless there
are objections.


The patchset implements the existing VFS ioctls for reading extended
ioctl flags by btrfs.

There are many flags/attributes/extended/combined, the naming is
confusing, so let's recap what we have:

* generic VFS inode flags (i_flags)
  - S_* namespace
  https://elixir.bootlin.com/linux/v4.17-rc1/source/include/linux/fs.h#L1850
  - FS_IOC_GETFLAGS, FS_IOC_SETFLAGS
  - tools: lsatrr, chattr

* btrfs inode flags, on-disk format, independent of the above, with
  to/from conversions
  https://elixir.bootlin.com/linux/v4.17-rc1/source/fs/btrfs/ctree.h#L1416

* extended attributes, also called XATTR, but they're different entity,
  stored by an inode as key:value pairs
  - tools: getfattr, setfattr

* XFLAGs, another interface to the generic S_* flags, new ioctl added
  because [GS]ETFLAGS is frozen, new bits added, eg. for project quotas
  or DAX, and more that originate in XFS features
  https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/fs.h#L168
  - tools: xfs_io -c lsattr, xfs_io -c chattr

In the future, btrfs will probably get:

- nodefrag -- eg. to disable autodefrag or defrag ioctl
- nosymlinks -- for directories, prevent creating new symlinks
- dax

git://github.com/kdave/btrfs-devel dev/xflags

David Sterba (8):
  btrfs: rename btrfs_update_iflags to reflect which flags it touches
  btrfs: rename btrfs_mask_flags to reflect which flags it touches
  btrfs: rename check_flags to reflect which flags it touches
  btrfs: rename btrfs_flags_to_ioctl to reflect which flags it touches
  btrfs: add helpers for FS_XFLAG_* conversion
  btrfs: add FS_IOC_FSGETXATTR ioctl
  btrfs: add FS_IOC_FSSETXATTR ioctl
  btrfs: unify naming of flags variables for SETFLAGS and XFLAGS

 fs/btrfs/ctree.h |   2 +-
 fs/btrfs/inode.c |   4 +-
 fs/btrfs/ioctl.c | 271 ++++++++++++++++++++++++++++++++++++++++++-------------
 3 files changed, 213 insertions(+), 64 deletions(-)

-- 
2.16.2


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-05-10 14:20 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-09 13:54 [PATCH v2 0/8] Add ioctl to support extended inode flags David Sterba
2018-05-09 13:54 ` [PATCH v2 1/8] btrfs: rename btrfs_update_iflags to reflect which flags it touches David Sterba
2018-05-10  6:34   ` Nikolay Borisov
2018-05-10 14:08     ` David Sterba
2018-05-09 13:54 ` [PATCH v2 2/8] btrfs: rename btrfs_mask_flags " David Sterba
2018-05-10  6:38   ` Nikolay Borisov
2018-05-10 14:11     ` David Sterba
2018-05-09 13:54 ` [PATCH v2 3/8] btrfs: rename check_flags " David Sterba
2018-05-09 13:54 ` [PATCH v2 4/8] btrfs: rename btrfs_flags_to_ioctl " David Sterba
2018-05-10  6:41   ` Nikolay Borisov
2018-05-09 13:54 ` [PATCH v2 5/8] btrfs: add helpers for FS_XFLAG_* conversion David Sterba
2018-05-10  6:44   ` Nikolay Borisov
2018-05-10 14:18     ` David Sterba
2018-05-09 13:54 ` [PATCH v2 6/8] btrfs: add FS_IOC_FSGETXATTR ioctl David Sterba
2018-05-09 13:54 ` [PATCH v2 7/8] btrfs: add FS_IOC_FSSETXATTR ioctl David Sterba
2018-05-09 13:54 ` [PATCH v2 8/8] btrfs: unify naming of flags variables for SETFLAGS and XFLAGS David Sterba

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.