#include "fs.h"
#include "messages.h"
#include "discard.h"
#include "super.h"
#ifdef CONFIG_PRINTK
#define STATE_STRING_PREFACE …
#define STATE_STRING_BUF_LEN …
static const char fs_state_chars[] = …;
static void btrfs_state_to_string(const struct btrfs_fs_info *info, char *buf)
{ … }
#endif
const char * __attribute_const__ btrfs_decode_error(int error)
{ … }
__cold
void __btrfs_handle_fs_error(struct btrfs_fs_info *fs_info, const char *function,
unsigned int line, int error, const char *fmt, ...)
{ … }
#ifdef CONFIG_PRINTK
static const char * const logtypes[] = …;
static struct ratelimit_state printk_limits[] = …;
void __cold _btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...)
{ … }
#endif
#if BITS_PER_LONG == 32
void __cold btrfs_warn_32bit_limit(struct btrfs_fs_info *fs_info)
{
if (!test_and_set_bit(BTRFS_FS_32BIT_WARN, &fs_info->flags)) {
btrfs_warn(fs_info, "reaching 32bit limit for logical addresses");
btrfs_warn(fs_info,
"due to page cache limit on 32bit systems, btrfs can't access metadata at or beyond %lluT",
BTRFS_32BIT_MAX_FILE_SIZE >> 40);
btrfs_warn(fs_info,
"please consider upgrading to 64bit kernel/hardware");
}
}
void __cold btrfs_err_32bit_limit(struct btrfs_fs_info *fs_info)
{
if (!test_and_set_bit(BTRFS_FS_32BIT_ERROR, &fs_info->flags)) {
btrfs_err(fs_info, "reached 32bit limit for logical addresses");
btrfs_err(fs_info,
"due to page cache limit on 32bit systems, metadata beyond %lluT can't be accessed",
BTRFS_32BIT_MAX_FILE_SIZE >> 40);
btrfs_err(fs_info,
"please consider upgrading to 64bit kernel/hardware");
}
}
#endif
__cold
void __btrfs_panic(const struct btrfs_fs_info *fs_info, const char *function,
unsigned int line, int error, const char *fmt, ...)
{ … }