summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/zoned.h
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2024-07-13 11:03:44 +0200
committerDavid Sterba <dsterba@suse.com>2024-07-19 17:20:23 +0200
commitc3ece6b7ffb4a7c00e8d53cbf4026a32b6127914 (patch)
tree3efd8c387863d20ab8fa0ed177b19141affff292 /fs/btrfs/zoned.h
parentbtrfs: fix extent map use-after-free when adding pages to compressed bio (diff)
downloadlinux-c3ece6b7ffb4a7c00e8d53cbf4026a32b6127914.tar.xz
linux-c3ece6b7ffb4a7c00e8d53cbf4026a32b6127914.zip
btrfs: change BTRFS_MOUNT_* flags to 64bit type
Currently the BTRFS_MOUNT_* flags are already beyond 32 bits, this is going to cause compilation errors for some 32 bit systems, as their unsigned long is only 32 bits long, thus flag BTRFS_MOUNT_IGNORESUPERFLAGS overflows and can lead to errors. Fix the problem by: - Migrate all existing BTRFS_MOUNT_* flags to unsigned long long - Migrate all mount option related variables to unsigned long long * btrfs_fs_info::mount_opt * btrfs_fs_context::mount_opt * mount_opt parameter of btrfs_check_options() * old_opts parameter of btrfs_remount_begin() * old_opts parameter of btrfs_remount_cleanup() * mount_opt parameter of btrfs_check_mountopts_zoned() * mount_opt and opt parameters of check_ro_option() Fixes: 32e6216512b4 ("btrfs: introduce new "rescue=ignoresuperflags" mount option") Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to '')
-rw-r--r--fs/btrfs/zoned.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/btrfs/zoned.h b/fs/btrfs/zoned.h
index d66d00c08001..30b2e48a1cec 100644
--- a/fs/btrfs/zoned.h
+++ b/fs/btrfs/zoned.h
@@ -58,7 +58,8 @@ int btrfs_get_dev_zone_info(struct btrfs_device *device, bool populate_cache);
void btrfs_destroy_dev_zone_info(struct btrfs_device *device);
struct btrfs_zoned_device_info *btrfs_clone_dev_zone_info(struct btrfs_device *orig_dev);
int btrfs_check_zoned_mode(struct btrfs_fs_info *fs_info);
-int btrfs_check_mountopts_zoned(const struct btrfs_fs_info *info, unsigned long *mount_opt);
+int btrfs_check_mountopts_zoned(const struct btrfs_fs_info *info,
+ unsigned long long *mount_opt);
int btrfs_sb_log_location_bdev(struct block_device *bdev, int mirror, int rw,
u64 *bytenr_ret);
int btrfs_sb_log_location(struct btrfs_device *device, int mirror, int rw,
@@ -130,7 +131,7 @@ static inline int btrfs_check_zoned_mode(const struct btrfs_fs_info *fs_info)
}
static inline int btrfs_check_mountopts_zoned(const struct btrfs_fs_info *info,
- unsigned long *mount_opt)
+ unsigned long long *mount_opt)
{
return 0;
}