messages.h (bbde07a40a13cc5a3483eaeb52e9bb3b61d2cf57) messages.h (b538a271ae9bd07e926b1e3bbfcd1aebf63e5860)
1/* SPDX-License-Identifier: GPL-2.0 */
2
3#ifndef BTRFS_MESSAGES_H
4#define BTRFS_MESSAGES_H
5
6#include <linux/types.h>
7
8struct btrfs_fs_info;

--- 215 unchanged lines hidden (view full) ---

224 * will panic(). Otherwise we BUG() here.
225 */
226#define btrfs_panic(fs_info, errno, fmt, args...) \
227do { \
228 __btrfs_panic(fs_info, __func__, __LINE__, errno, fmt, ##args); \
229 BUG(); \
230} while (0)
231
1/* SPDX-License-Identifier: GPL-2.0 */
2
3#ifndef BTRFS_MESSAGES_H
4#define BTRFS_MESSAGES_H
5
6#include <linux/types.h>
7
8struct btrfs_fs_info;

--- 215 unchanged lines hidden (view full) ---

224 * will panic(). Otherwise we BUG() here.
225 */
226#define btrfs_panic(fs_info, errno, fmt, args...) \
227do { \
228 __btrfs_panic(fs_info, __func__, __LINE__, errno, fmt, ##args); \
229 BUG(); \
230} while (0)
231
232#if BITS_PER_LONG == 32
233#define BTRFS_32BIT_MAX_FILE_SIZE (((u64)ULONG_MAX + 1) << PAGE_SHIFT)
234/*
235 * The warning threshold is 5/8th of the MAX_LFS_FILESIZE that limits the logical
236 * addresses of extents.
237 *
238 * For 4K page size it's about 10T, for 64K it's 160T.
239 */
240#define BTRFS_32BIT_EARLY_WARN_THRESHOLD (BTRFS_32BIT_MAX_FILE_SIZE * 5 / 8)
241void btrfs_warn_32bit_limit(struct btrfs_fs_info *fs_info);
242void btrfs_err_32bit_limit(struct btrfs_fs_info *fs_info);
232#endif
243#endif
244
245#endif