]> git.ipfire.org Git - thirdparty/linux.git/commit - fs/btrfs/ioctl.c
btrfs: add FS_IOC_FSSETXATTR ioctl
authorDavid Sterba <dsterba@suse.com>
Mon, 26 Mar 2018 17:51:16 +0000 (19:51 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 28 May 2018 16:23:31 +0000 (18:23 +0200)
commit025f2121488ec4362394c691d3e3b3576bd7868a
tree56473d58aa12428f15ac40ca45aae83758ad82cd
parente4202ac927eb0994f18e1305fe46c34341334f8a
btrfs: add FS_IOC_FSSETXATTR ioctl

The new ioctl is an extension to the FS_IOC_SETFLAGS and adds new
flags and is extensible. Don't get fooled by the XATTR in the name, it
does not have anything in common with the extended attributes,
incidentally also abbreviated as XATTRs.

This patch allows to set the xflags portion of the fsxattr structure,
other items have no meaning and non-zero values will result in
EOPNOTSUPP.

Currently supported xflags:

- APPEND
- IMMUTABLE
- NOATIME
- NODUMP
- SYNC

The structure of btrfs_ioctl_fssetxattr copies btrfs_ioctl_setflags but
is simpler on the flag setting side.

The original patch was written by Chandan Jay Sharma but was incomplete
and no further revision has been sent.

Based-on-patches-by: Chandan Jay Sharma <chandansbg@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ioctl.c