btrfs: move the 32bit warn defines into messages.h
The code for these functions are in messages.c, move the defines and prototypes to messages.h. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
af142b6f44
commit
b538a271ae
|
@ -695,19 +695,6 @@ int btrfs_sync_fs(struct super_block *sb, int wait);
|
||||||
char *btrfs_get_subvol_name_from_objectid(struct btrfs_fs_info *fs_info,
|
char *btrfs_get_subvol_name_from_objectid(struct btrfs_fs_info *fs_info,
|
||||||
u64 subvol_objectid);
|
u64 subvol_objectid);
|
||||||
|
|
||||||
#if BITS_PER_LONG == 32
|
|
||||||
#define BTRFS_32BIT_MAX_FILE_SIZE (((u64)ULONG_MAX + 1) << PAGE_SHIFT)
|
|
||||||
/*
|
|
||||||
* The warning threshold is 5/8th of the MAX_LFS_FILESIZE that limits the logical
|
|
||||||
* addresses of extents.
|
|
||||||
*
|
|
||||||
* For 4K page size it's about 10T, for 64K it's 160T.
|
|
||||||
*/
|
|
||||||
#define BTRFS_32BIT_EARLY_WARN_THRESHOLD (BTRFS_32BIT_MAX_FILE_SIZE * 5 / 8)
|
|
||||||
void btrfs_warn_32bit_limit(struct btrfs_fs_info *fs_info);
|
|
||||||
void btrfs_err_32bit_limit(struct btrfs_fs_info *fs_info);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get the correct offset inside the page of extent buffer.
|
* Get the correct offset inside the page of extent buffer.
|
||||||
*
|
*
|
||||||
|
|
|
@ -229,4 +229,17 @@ do { \
|
||||||
BUG(); \
|
BUG(); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
#if BITS_PER_LONG == 32
|
||||||
|
#define BTRFS_32BIT_MAX_FILE_SIZE (((u64)ULONG_MAX + 1) << PAGE_SHIFT)
|
||||||
|
/*
|
||||||
|
* The warning threshold is 5/8th of the MAX_LFS_FILESIZE that limits the logical
|
||||||
|
* addresses of extents.
|
||||||
|
*
|
||||||
|
* For 4K page size it's about 10T, for 64K it's 160T.
|
||||||
|
*/
|
||||||
|
#define BTRFS_32BIT_EARLY_WARN_THRESHOLD (BTRFS_32BIT_MAX_FILE_SIZE * 5 / 8)
|
||||||
|
void btrfs_warn_32bit_limit(struct btrfs_fs_info *fs_info);
|
||||||
|
void btrfs_err_32bit_limit(struct btrfs_fs_info *fs_info);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue