]> www.infradead.org Git - users/dwmw2/linux.git/commit
btrfs: change BTRFS_MOUNT_* flags to 64bit type
authorQu Wenruo <wqu@suse.com>
Sat, 13 Jul 2024 09:03:44 +0000 (18:33 +0930)
committerDavid Sterba <dsterba@suse.com>
Fri, 19 Jul 2024 15:20:23 +0000 (17:20 +0200)
commitc3ece6b7ffb4a7c00e8d53cbf4026a32b6127914
tree3efd8c387863d20ab8fa0ed177b19141affff292
parent8e7860543a94784d744c7ce34b78a2e11beefa5c
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>
fs/btrfs/fs.h
fs/btrfs/super.c
fs/btrfs/super.h
fs/btrfs/zoned.c
fs/btrfs/zoned.h