]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita30840d9566cb830374a2aae4ff3fce5966043d4
tree56473d58aa12428f15ac40ca45aae83758ad82cd
parent01b7dfc4002886db000d5a51106ef0c3203c2a24
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