diff options
author | Anand Jain <anand.jain@oracle.com> | 2023-06-20 10:55:09 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-08-21 14:52:12 +0200 |
commit | 070bb0011ccfd00c7de25dce2489fbe9cce5ba44 (patch) | |
tree | 7fef65256cb8b193035c6076680655263b2c31a3 /include/trace/events/btrfs.h | |
parent | btrfs: raid56: remove unused BTRFS_RBIO_REBUILD_MISSING (diff) | |
download | linux-070bb0011ccfd00c7de25dce2489fbe9cce5ba44.tar.xz linux-070bb0011ccfd00c7de25dce2489fbe9cce5ba44.zip |
btrfs: sysfs: show if ACL support has been compiled in
ACL support depends on the compile-time configuration option
CONFIG_BTRFS_FS_POSIX_ACL. Prior to mounting a btrfs filesystem, it is not
possible to determine whether ACL support has been compiled in. To address
this, add a sysfs interface, /sys/fs/btrfs/features/acl, and check for ACL
support in the system's btrfs.
To determine ACL support:
Return 0 indicates ACL is not supported:
$ cat /sys/fs/btrfs/features/acl
0
Return 1 indicates ACL is supported:
$ cat /sys/fs/btrfs/features/acl
1
IMO, this is a better approach, so that we also know if kernel is older.
On an older kernel
$ ls /sys/fs/btrfs/features/acl
ls: cannot access '/sys/fs/btrfs/features/acl': No such file or directory
mount a btrfs filesystem
$ cat /proc/self/mounts | grep btrfs | grep -q noacl
$ echo $?
0
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'include/trace/events/btrfs.h')
0 files changed, 0 insertions, 0 deletions