]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
fs: enable pre-content events on supported file systems
authorJosef Bacik <josef@toxicpanda.com>
Fri, 15 Nov 2024 15:30:32 +0000 (10:30 -0500)
committerJan Kara <jack@suse.cz>
Wed, 11 Dec 2024 16:28:41 +0000 (17:28 +0100)
Now that all the code has been added for pre-content events, and the
various file systems that need the page fault hooks for fsnotify have
been updated, add SB_I_ALLOW_HSM to the supported file systems.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/46960dcb2725fa0317895ed66a8409ba1c306a82.1731684329.git.josef@toxicpanda.com
fs/btrfs/super.c
fs/ext4/super.c
fs/xfs/xfs_super.c

index 97a85d180b61ab9b0c709b5548cbfb42322811b2..fe6ecc3f1cab6993d639cc2e801a6f5584f66f5e 100644 (file)
@@ -961,7 +961,7 @@ static int btrfs_fill_super(struct super_block *sb,
 #endif
        sb->s_xattr = btrfs_xattr_handlers;
        sb->s_time_gran = 1;
-       sb->s_iflags |= SB_I_CGROUPWB;
+       sb->s_iflags |= SB_I_CGROUPWB | SB_I_ALLOW_HSM;
 
        err = super_setup_bdi(sb);
        if (err) {
index 785809f33ff4a9bda0dcf3f03092fb7816c5b49d..029fc5fc4ffe81521326c24b7b43ce9e2f3604c9 100644 (file)
@@ -5312,6 +5312,9 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb)
        /* i_version is always enabled now */
        sb->s_flags |= SB_I_VERSION;
 
+       /* HSM events are allowed by default. */
+       sb->s_iflags |= SB_I_ALLOW_HSM;
+
        err = ext4_check_feature_compatibility(sb, es, silent);
        if (err)
                goto failed_mount;
index 394fdf3bb535311afd99bd191e693e47a72e6742..8524b9d4287397f9913c8143c93c9c708c03fe87 100644 (file)
@@ -1730,7 +1730,7 @@ xfs_fs_fill_super(
                sb->s_time_max = XFS_LEGACY_TIME_MAX;
        }
        trace_xfs_inode_timestamp_range(mp, sb->s_time_min, sb->s_time_max);
-       sb->s_iflags |= SB_I_CGROUPWB;
+       sb->s_iflags |= SB_I_CGROUPWB | SB_I_ALLOW_HSM;
 
        set_posix_acl_flag(sb);