Lines Matching refs:fs_info

409 #define BTRFS_MAX_EXTENT_ITEM_SIZE(r) ((BTRFS_LEAF_DATA_SIZE(r->fs_info) >> 4) - \
519 void btrfs_init_async_reclaim_work(struct btrfs_fs_info *fs_info);
553 bool btrfs_pinned_by_swapfile(struct btrfs_fs_info *fs_info, void *ptr);
1140 struct btrfs_fs_info *fs_info; member
1444 #define btrfs_test_opt(fs_info, opt) ((fs_info)->mount_opt & \ argument
1447 #define btrfs_set_and_info(fs_info, opt, fmt, args...) \ argument
1449 if (!btrfs_test_opt(fs_info, opt)) \
1450 btrfs_info(fs_info, fmt, ##args); \
1451 btrfs_set_opt(fs_info->mount_opt, opt); \
1454 #define btrfs_clear_and_info(fs_info, opt, fmt, args...) \ argument
1456 if (btrfs_test_opt(fs_info, opt)) \
1457 btrfs_info(fs_info, fmt, ##args); \
1458 btrfs_clear_opt(fs_info->mount_opt, opt); \
1545 #define BTRFS_BYTES_TO_BLKS(fs_info, bytes) \ argument
1546 ((bytes) >> (fs_info)->sectorsize_bits)
1666 WARN_ON(!IS_ALIGNED(val, eb->fs_info->sectorsize)); in btrfs_set_device_total_bytes()
2465 return BTRFS_LEAF_DATA_SIZE(leaf->fs_info); in leaf_data_end()
2673 const struct btrfs_fs_info *fs_info, u64 csum_bytes) in btrfs_csum_bytes_to_leaves() argument
2675 const u64 num_csums = csum_bytes >> fs_info->sectorsize_bits; in btrfs_csum_bytes_to_leaves()
2677 return DIV_ROUND_UP_ULL(num_csums, fs_info->csums_per_leaf); in btrfs_csum_bytes_to_leaves()
2684 static inline u64 btrfs_calc_insert_metadata_size(struct btrfs_fs_info *fs_info, in btrfs_calc_insert_metadata_size() argument
2687 return (u64)fs_info->nodesize * BTRFS_MAX_LEVEL * 2 * num_items; in btrfs_calc_insert_metadata_size()
2694 static inline u64 btrfs_calc_metadata_size(struct btrfs_fs_info *fs_info, in btrfs_calc_metadata_size() argument
2697 return (u64)fs_info->nodesize * BTRFS_MAX_LEVEL * num_items; in btrfs_calc_metadata_size()
2700 int btrfs_add_excluded_extent(struct btrfs_fs_info *fs_info,
2705 void btrfs_cleanup_ref_head_accounting(struct btrfs_fs_info *fs_info,
2708 int btrfs_lookup_data_extent(struct btrfs_fs_info *fs_info, u64 start, u64 len);
2710 struct btrfs_fs_info *fs_info, u64 bytenr,
2749 int btrfs_free_reserved_extent(struct btrfs_fs_info *fs_info,
2827 int btrfs_error_unpin_extent_range(struct btrfs_fs_info *fs_info,
2829 int btrfs_discard_extent(struct btrfs_fs_info *fs_info, u64 bytenr,
2831 int btrfs_trim_fs(struct btrfs_fs_info *fs_info, struct fstrim_range *range);
2833 int btrfs_init_space_info(struct btrfs_fs_info *fs_info);
2835 struct btrfs_fs_info *fs_info);
2849 void btrfs_set_item_key_safe(struct btrfs_fs_info *fs_info,
3003 static inline int btrfs_fs_closing(struct btrfs_fs_info *fs_info) in btrfs_fs_closing() argument
3008 if (test_bit(BTRFS_FS_CLOSING_START, &fs_info->flags)) { in btrfs_fs_closing()
3009 if (test_bit(BTRFS_FS_CLOSING_DONE, &fs_info->flags)) in btrfs_fs_closing()
3024 static inline int btrfs_need_cleaner_sleep(struct btrfs_fs_info *fs_info) in btrfs_need_cleaner_sleep() argument
3026 return test_bit(BTRFS_FS_STATE_RO, &fs_info->fs_state) || in btrfs_need_cleaner_sleep()
3027 btrfs_fs_closing(fs_info); in btrfs_need_cleaner_sleep()
3061 int btrfs_find_orphan_roots(struct btrfs_fs_info *fs_info);
3073 int btrfs_uuid_tree_iterate(struct btrfs_fs_info *fs_info);
3110 struct btrfs_dir_item *btrfs_match_dir_item_name(struct btrfs_fs_info *fs_info,
3217 int btrfs_start_delalloc_roots(struct btrfs_fs_info *fs_info, long nr,
3260 void btrfs_run_delayed_iputs(struct btrfs_fs_info *fs_info);
3261 int btrfs_wait_on_delayed_iputs(struct btrfs_fs_info *fs_info);
3305 void btrfs_update_ioctl_balance_args(struct btrfs_fs_info *fs_info,
3307 bool btrfs_exclop_start(struct btrfs_fs_info *fs_info,
3309 bool btrfs_exclop_start_try_lock(struct btrfs_fs_info *fs_info,
3311 void btrfs_exclop_start_unlock(struct btrfs_fs_info *fs_info);
3312 void btrfs_exclop_finish(struct btrfs_fs_info *fs_info);
3319 int btrfs_run_defrag_inodes(struct btrfs_fs_info *fs_info);
3320 void btrfs_cleanup_defrag_inodes(struct btrfs_fs_info *fs_info);
3352 char *btrfs_get_subvol_name_from_objectid(struct btrfs_fs_info *fs_info,
3356 void btrfs_no_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...) in btrfs_no_printk() argument
3363 void btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...);
3365 #define btrfs_printk(fs_info, fmt, args...) \ argument
3366 btrfs_no_printk(fs_info, fmt, ##args)
3369 #define btrfs_emerg(fs_info, fmt, args...) \ argument
3370 btrfs_printk(fs_info, KERN_EMERG fmt, ##args)
3371 #define btrfs_alert(fs_info, fmt, args...) \ argument
3372 btrfs_printk(fs_info, KERN_ALERT fmt, ##args)
3373 #define btrfs_crit(fs_info, fmt, args...) \ argument
3374 btrfs_printk(fs_info, KERN_CRIT fmt, ##args)
3375 #define btrfs_err(fs_info, fmt, args...) \ argument
3376 btrfs_printk(fs_info, KERN_ERR fmt, ##args)
3377 #define btrfs_warn(fs_info, fmt, args...) \ argument
3378 btrfs_printk(fs_info, KERN_WARNING fmt, ##args)
3379 #define btrfs_notice(fs_info, fmt, args...) \ argument
3380 btrfs_printk(fs_info, KERN_NOTICE fmt, ##args)
3381 #define btrfs_info(fs_info, fmt, args...) \ argument
3382 btrfs_printk(fs_info, KERN_INFO fmt, ##args)
3387 #define btrfs_emerg_in_rcu(fs_info, fmt, args...) \ argument
3388 btrfs_printk_in_rcu(fs_info, KERN_EMERG fmt, ##args)
3389 #define btrfs_alert_in_rcu(fs_info, fmt, args...) \ argument
3390 btrfs_printk_in_rcu(fs_info, KERN_ALERT fmt, ##args)
3391 #define btrfs_crit_in_rcu(fs_info, fmt, args...) \ argument
3392 btrfs_printk_in_rcu(fs_info, KERN_CRIT fmt, ##args)
3393 #define btrfs_err_in_rcu(fs_info, fmt, args...) \ argument
3394 btrfs_printk_in_rcu(fs_info, KERN_ERR fmt, ##args)
3395 #define btrfs_warn_in_rcu(fs_info, fmt, args...) \ argument
3396 btrfs_printk_in_rcu(fs_info, KERN_WARNING fmt, ##args)
3397 #define btrfs_notice_in_rcu(fs_info, fmt, args...) \ argument
3398 btrfs_printk_in_rcu(fs_info, KERN_NOTICE fmt, ##args)
3399 #define btrfs_info_in_rcu(fs_info, fmt, args...) \ argument
3400 btrfs_printk_in_rcu(fs_info, KERN_INFO fmt, ##args)
3405 #define btrfs_emerg_rl_in_rcu(fs_info, fmt, args...) \ argument
3406 btrfs_printk_rl_in_rcu(fs_info, KERN_EMERG fmt, ##args)
3407 #define btrfs_alert_rl_in_rcu(fs_info, fmt, args...) \ argument
3408 btrfs_printk_rl_in_rcu(fs_info, KERN_ALERT fmt, ##args)
3409 #define btrfs_crit_rl_in_rcu(fs_info, fmt, args...) \ argument
3410 btrfs_printk_rl_in_rcu(fs_info, KERN_CRIT fmt, ##args)
3411 #define btrfs_err_rl_in_rcu(fs_info, fmt, args...) \ argument
3412 btrfs_printk_rl_in_rcu(fs_info, KERN_ERR fmt, ##args)
3413 #define btrfs_warn_rl_in_rcu(fs_info, fmt, args...) \ argument
3414 btrfs_printk_rl_in_rcu(fs_info, KERN_WARNING fmt, ##args)
3415 #define btrfs_notice_rl_in_rcu(fs_info, fmt, args...) \ argument
3416 btrfs_printk_rl_in_rcu(fs_info, KERN_NOTICE fmt, ##args)
3417 #define btrfs_info_rl_in_rcu(fs_info, fmt, args...) \ argument
3418 btrfs_printk_rl_in_rcu(fs_info, KERN_INFO fmt, ##args)
3423 #define btrfs_emerg_rl(fs_info, fmt, args...) \ argument
3424 btrfs_printk_ratelimited(fs_info, KERN_EMERG fmt, ##args)
3425 #define btrfs_alert_rl(fs_info, fmt, args...) \ argument
3426 btrfs_printk_ratelimited(fs_info, KERN_ALERT fmt, ##args)
3427 #define btrfs_crit_rl(fs_info, fmt, args...) \ argument
3428 btrfs_printk_ratelimited(fs_info, KERN_CRIT fmt, ##args)
3429 #define btrfs_err_rl(fs_info, fmt, args...) \ argument
3430 btrfs_printk_ratelimited(fs_info, KERN_ERR fmt, ##args)
3431 #define btrfs_warn_rl(fs_info, fmt, args...) \ argument
3432 btrfs_printk_ratelimited(fs_info, KERN_WARNING fmt, ##args)
3433 #define btrfs_notice_rl(fs_info, fmt, args...) \ argument
3434 btrfs_printk_ratelimited(fs_info, KERN_NOTICE fmt, ##args)
3435 #define btrfs_info_rl(fs_info, fmt, args...) \ argument
3436 btrfs_printk_ratelimited(fs_info, KERN_INFO fmt, ##args)
3439 #define btrfs_debug(fs_info, fmt, args...) \ argument
3441 fs_info, KERN_DEBUG fmt, ##args)
3442 #define btrfs_debug_in_rcu(fs_info, fmt, args...) \ argument
3444 fs_info, KERN_DEBUG fmt, ##args)
3445 #define btrfs_debug_rl_in_rcu(fs_info, fmt, args...) \ argument
3447 fs_info, KERN_DEBUG fmt, ##args)
3448 #define btrfs_debug_rl(fs_info, fmt, args...) \ argument
3450 fs_info, KERN_DEBUG fmt, ##args)
3452 #define btrfs_debug(fs_info, fmt, args...) \ argument
3453 btrfs_printk(fs_info, KERN_DEBUG fmt, ##args)
3454 #define btrfs_debug_in_rcu(fs_info, fmt, args...) \ argument
3455 btrfs_printk_in_rcu(fs_info, KERN_DEBUG fmt, ##args)
3456 #define btrfs_debug_rl_in_rcu(fs_info, fmt, args...) \ argument
3457 btrfs_printk_rl_in_rcu(fs_info, KERN_DEBUG fmt, ##args)
3458 #define btrfs_debug_rl(fs_info, fmt, args...) \ argument
3459 btrfs_printk_ratelimited(fs_info, KERN_DEBUG fmt, ##args)
3461 #define btrfs_debug(fs_info, fmt, args...) \ argument
3462 btrfs_no_printk(fs_info, KERN_DEBUG fmt, ##args)
3463 #define btrfs_debug_in_rcu(fs_info, fmt, args...) \ argument
3464 btrfs_no_printk_in_rcu(fs_info, KERN_DEBUG fmt, ##args)
3465 #define btrfs_debug_rl_in_rcu(fs_info, fmt, args...) \ argument
3466 btrfs_no_printk_in_rcu(fs_info, KERN_DEBUG fmt, ##args)
3467 #define btrfs_debug_rl(fs_info, fmt, args...) \ argument
3468 btrfs_no_printk(fs_info, KERN_DEBUG fmt, ##args)
3471 #define btrfs_printk_in_rcu(fs_info, fmt, args...) \ argument
3474 btrfs_printk(fs_info, fmt, ##args); \
3478 #define btrfs_no_printk_in_rcu(fs_info, fmt, args...) \ argument
3481 btrfs_no_printk(fs_info, fmt, ##args); \
3485 #define btrfs_printk_ratelimited(fs_info, fmt, args...) \ argument
3491 btrfs_printk(fs_info, fmt, ##args); \
3494 #define btrfs_printk_rl_in_rcu(fs_info, fmt, args...) \ argument
3497 btrfs_printk_ratelimited(fs_info, fmt, ##args); \
3526 void btrfs_warn_32bit_limit(struct btrfs_fs_info *fs_info);
3527 void btrfs_err_32bit_limit(struct btrfs_fs_info *fs_info);
3574 static inline void btrfs_print_v0_err(struct btrfs_fs_info *fs_info) in btrfs_print_v0_err() argument
3576 btrfs_err(fs_info, in btrfs_print_v0_err()
3582 void __btrfs_handle_fs_error(struct btrfs_fs_info *fs_info, const char *function,
3600 &((trans)->fs_info->fs_state))) { \
3606 btrfs_debug((trans)->fs_info, \
3615 #define btrfs_handle_fs_error(fs_info, errno, fmt, args...) \ argument
3617 __btrfs_handle_fs_error((fs_info), __func__, __LINE__, \
3621 #define BTRFS_FS_ERROR(fs_info) (unlikely(test_bit(BTRFS_FS_STATE_ERROR, \ argument
3622 &(fs_info)->fs_state)))
3626 void __btrfs_panic(struct btrfs_fs_info *fs_info, const char *function,
3632 #define btrfs_panic(fs_info, errno, fmt, args...) \ argument
3634 __btrfs_panic(fs_info, __func__, __LINE__, errno, fmt, ##args); \
3645 static inline void __btrfs_set_fs_incompat(struct btrfs_fs_info *fs_info, in __btrfs_set_fs_incompat() argument
3651 disk_super = fs_info->super_copy; in __btrfs_set_fs_incompat()
3654 spin_lock(&fs_info->super_lock); in __btrfs_set_fs_incompat()
3659 btrfs_info(fs_info, in __btrfs_set_fs_incompat()
3663 spin_unlock(&fs_info->super_lock); in __btrfs_set_fs_incompat()
3671 static inline void __btrfs_clear_fs_incompat(struct btrfs_fs_info *fs_info, in __btrfs_clear_fs_incompat() argument
3677 disk_super = fs_info->super_copy; in __btrfs_clear_fs_incompat()
3680 spin_lock(&fs_info->super_lock); in __btrfs_clear_fs_incompat()
3685 btrfs_info(fs_info, in __btrfs_clear_fs_incompat()
3689 spin_unlock(&fs_info->super_lock); in __btrfs_clear_fs_incompat()
3693 #define btrfs_fs_incompat(fs_info, opt) \ argument
3694 __btrfs_fs_incompat((fs_info), BTRFS_FEATURE_INCOMPAT_##opt)
3696 static inline bool __btrfs_fs_incompat(struct btrfs_fs_info *fs_info, u64 flag) in __btrfs_fs_incompat() argument
3699 disk_super = fs_info->super_copy; in __btrfs_fs_incompat()
3707 static inline void __btrfs_set_fs_compat_ro(struct btrfs_fs_info *fs_info, in __btrfs_set_fs_compat_ro() argument
3713 disk_super = fs_info->super_copy; in __btrfs_set_fs_compat_ro()
3716 spin_lock(&fs_info->super_lock); in __btrfs_set_fs_compat_ro()
3721 btrfs_info(fs_info, in __btrfs_set_fs_compat_ro()
3725 spin_unlock(&fs_info->super_lock); in __btrfs_set_fs_compat_ro()
3733 static inline void __btrfs_clear_fs_compat_ro(struct btrfs_fs_info *fs_info, in __btrfs_clear_fs_compat_ro() argument
3739 disk_super = fs_info->super_copy; in __btrfs_clear_fs_compat_ro()
3742 spin_lock(&fs_info->super_lock); in __btrfs_clear_fs_compat_ro()
3747 btrfs_info(fs_info, in __btrfs_clear_fs_compat_ro()
3751 spin_unlock(&fs_info->super_lock); in __btrfs_clear_fs_compat_ro()
3755 #define btrfs_fs_compat_ro(fs_info, opt) \ argument
3756 __btrfs_fs_compat_ro((fs_info), BTRFS_FEATURE_COMPAT_RO_##opt)
3758 static inline int __btrfs_fs_compat_ro(struct btrfs_fs_info *fs_info, u64 flag) in __btrfs_fs_compat_ro() argument
3761 disk_super = fs_info->super_copy; in __btrfs_fs_compat_ro()
3783 int btrfs_relocate_block_group(struct btrfs_fs_info *fs_info, u64 group_start);
3797 int btrfs_should_cancel_balance(struct btrfs_fs_info *fs_info);
3798 struct btrfs_root *find_reloc_root(struct btrfs_fs_info *fs_info,
3803 int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start,
3806 void btrfs_scrub_pause(struct btrfs_fs_info *fs_info);
3807 void btrfs_scrub_continue(struct btrfs_fs_info *fs_info);
3810 int btrfs_scrub_progress(struct btrfs_fs_info *fs_info, u64 devid,
3820 void btrfs_bio_counter_inc_blocked(struct btrfs_fs_info *fs_info);
3821 void btrfs_bio_counter_inc_noblocked(struct btrfs_fs_info *fs_info);
3822 void btrfs_bio_counter_sub(struct btrfs_fs_info *fs_info, s64 amount);
3824 static inline void btrfs_bio_counter_dec(struct btrfs_fs_info *fs_info) in btrfs_bio_counter_dec() argument
3826 btrfs_bio_counter_sub(fs_info, 1); in btrfs_bio_counter_dec()
3831 struct btrfs_fs_info *fs_info; /* tree to prefetch */ member
3855 static inline int btrfs_defrag_cancelled(struct btrfs_fs_info *fs_info) in btrfs_defrag_cancelled() argument
3887 static inline int btrfs_is_testing(struct btrfs_fs_info *fs_info) in btrfs_is_testing() argument
3889 return test_bit(BTRFS_FS_STATE_DUMMY_FS_INFO, &fs_info->fs_state); in btrfs_is_testing()
3892 static inline int btrfs_is_testing(struct btrfs_fs_info *fs_info) in btrfs_is_testing() argument
3898 static inline bool btrfs_is_zoned(const struct btrfs_fs_info *fs_info) in btrfs_is_zoned() argument
3900 return fs_info->zoned != 0; in btrfs_is_zoned()