Lines Matching refs:fs_info

379 #define BTRFS_MAX_EXTENT_ITEM_SIZE(r) ((BTRFS_LEAF_DATA_SIZE(r->fs_info) >> 4) - \
498 void btrfs_init_async_reclaim_work(struct btrfs_fs_info *fs_info);
532 bool btrfs_pinned_by_swapfile(struct btrfs_fs_info *fs_info, void *ptr);
1063 struct btrfs_fs_info *fs_info; member
1316 #define btrfs_test_opt(fs_info, opt) ((fs_info)->mount_opt & \ argument
1319 #define btrfs_set_and_info(fs_info, opt, fmt, args...) \ argument
1321 if (!btrfs_test_opt(fs_info, opt)) \
1322 btrfs_info(fs_info, fmt, ##args); \
1323 btrfs_set_opt(fs_info->mount_opt, opt); \
1326 #define btrfs_clear_and_info(fs_info, opt, fmt, args...) \ argument
1328 if (btrfs_test_opt(fs_info, opt)) \
1329 btrfs_info(fs_info, fmt, ##args); \
1330 btrfs_clear_opt(fs_info->mount_opt, opt); \
1415 #define BTRFS_BYTES_TO_BLKS(fs_info, bytes) \ argument
1416 ((bytes) >> (fs_info)->sb->s_blocksize_bits)
1535 WARN_ON(!IS_ALIGNED(val, eb->fs_info->sectorsize)); in btrfs_set_device_total_bytes()
2326 return BTRFS_LEAF_DATA_SIZE(leaf->fs_info); in leaf_data_end()
2529 u64 btrfs_csum_bytes_to_leaves(struct btrfs_fs_info *fs_info, u64 csum_bytes);
2535 static inline u64 btrfs_calc_insert_metadata_size(struct btrfs_fs_info *fs_info, in btrfs_calc_insert_metadata_size() argument
2538 return (u64)fs_info->nodesize * BTRFS_MAX_LEVEL * 2 * num_items; in btrfs_calc_insert_metadata_size()
2545 static inline u64 btrfs_calc_metadata_size(struct btrfs_fs_info *fs_info, in btrfs_calc_metadata_size() argument
2548 return (u64)fs_info->nodesize * BTRFS_MAX_LEVEL * num_items; in btrfs_calc_metadata_size()
2551 int btrfs_add_excluded_extent(struct btrfs_fs_info *fs_info,
2556 void btrfs_cleanup_ref_head_accounting(struct btrfs_fs_info *fs_info,
2559 int btrfs_lookup_data_extent(struct btrfs_fs_info *fs_info, u64 start, u64 len);
2561 struct btrfs_fs_info *fs_info, u64 bytenr,
2600 int btrfs_free_reserved_extent(struct btrfs_fs_info *fs_info,
2608 int btrfs_extent_readonly(struct btrfs_fs_info *fs_info, u64 bytenr);
2678 int btrfs_error_unpin_extent_range(struct btrfs_fs_info *fs_info,
2680 int btrfs_discard_extent(struct btrfs_fs_info *fs_info, u64 bytenr,
2682 int btrfs_trim_fs(struct btrfs_fs_info *fs_info, struct fstrim_range *range);
2684 int btrfs_init_space_info(struct btrfs_fs_info *fs_info);
2686 struct btrfs_fs_info *fs_info);
2700 void btrfs_set_item_key_safe(struct btrfs_fs_info *fs_info,
2806 static inline int btrfs_fs_closing(struct btrfs_fs_info *fs_info) in btrfs_fs_closing() argument
2811 if (test_bit(BTRFS_FS_CLOSING_START, &fs_info->flags)) { in btrfs_fs_closing()
2812 if (test_bit(BTRFS_FS_CLOSING_DONE, &fs_info->flags)) in btrfs_fs_closing()
2824 static inline int btrfs_need_cleaner_sleep(struct btrfs_fs_info *fs_info) in btrfs_need_cleaner_sleep() argument
2826 return fs_info->sb->s_flags & SB_RDONLY || btrfs_fs_closing(fs_info); in btrfs_need_cleaner_sleep()
2830 u64 btrfs_get_tree_mod_seq(struct btrfs_fs_info *fs_info,
2832 void btrfs_put_tree_mod_seq(struct btrfs_fs_info *fs_info,
2855 int btrfs_find_orphan_roots(struct btrfs_fs_info *fs_info);
2867 int btrfs_uuid_tree_iterate(struct btrfs_fs_info *fs_info);
2904 struct btrfs_dir_item *btrfs_match_dir_item_name(struct btrfs_fs_info *fs_info,
3012 int btrfs_start_delalloc_roots(struct btrfs_fs_info *fs_info, u64 nr,
3058 void btrfs_run_delayed_iputs(struct btrfs_fs_info *fs_info);
3059 int btrfs_wait_on_delayed_iputs(struct btrfs_fs_info *fs_info);
3087 void btrfs_update_ioctl_balance_args(struct btrfs_fs_info *fs_info,
3089 bool btrfs_exclop_start(struct btrfs_fs_info *fs_info,
3091 void btrfs_exclop_finish(struct btrfs_fs_info *fs_info);
3098 int btrfs_run_defrag_inodes(struct btrfs_fs_info *fs_info);
3099 void btrfs_cleanup_defrag_inodes(struct btrfs_fs_info *fs_info);
3137 char *btrfs_get_subvol_name_from_objectid(struct btrfs_fs_info *fs_info,
3141 void btrfs_no_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...) in btrfs_no_printk() argument
3148 void btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...);
3150 #define btrfs_printk(fs_info, fmt, args...) \ argument
3151 btrfs_no_printk(fs_info, fmt, ##args)
3154 #define btrfs_emerg(fs_info, fmt, args...) \ argument
3155 btrfs_printk(fs_info, KERN_EMERG fmt, ##args)
3156 #define btrfs_alert(fs_info, fmt, args...) \ argument
3157 btrfs_printk(fs_info, KERN_ALERT fmt, ##args)
3158 #define btrfs_crit(fs_info, fmt, args...) \ argument
3159 btrfs_printk(fs_info, KERN_CRIT fmt, ##args)
3160 #define btrfs_err(fs_info, fmt, args...) \ argument
3161 btrfs_printk(fs_info, KERN_ERR fmt, ##args)
3162 #define btrfs_warn(fs_info, fmt, args...) \ argument
3163 btrfs_printk(fs_info, KERN_WARNING fmt, ##args)
3164 #define btrfs_notice(fs_info, fmt, args...) \ argument
3165 btrfs_printk(fs_info, KERN_NOTICE fmt, ##args)
3166 #define btrfs_info(fs_info, fmt, args...) \ argument
3167 btrfs_printk(fs_info, KERN_INFO fmt, ##args)
3172 #define btrfs_emerg_in_rcu(fs_info, fmt, args...) \ argument
3173 btrfs_printk_in_rcu(fs_info, KERN_EMERG fmt, ##args)
3174 #define btrfs_alert_in_rcu(fs_info, fmt, args...) \ argument
3175 btrfs_printk_in_rcu(fs_info, KERN_ALERT fmt, ##args)
3176 #define btrfs_crit_in_rcu(fs_info, fmt, args...) \ argument
3177 btrfs_printk_in_rcu(fs_info, KERN_CRIT fmt, ##args)
3178 #define btrfs_err_in_rcu(fs_info, fmt, args...) \ argument
3179 btrfs_printk_in_rcu(fs_info, KERN_ERR fmt, ##args)
3180 #define btrfs_warn_in_rcu(fs_info, fmt, args...) \ argument
3181 btrfs_printk_in_rcu(fs_info, KERN_WARNING fmt, ##args)
3182 #define btrfs_notice_in_rcu(fs_info, fmt, args...) \ argument
3183 btrfs_printk_in_rcu(fs_info, KERN_NOTICE fmt, ##args)
3184 #define btrfs_info_in_rcu(fs_info, fmt, args...) \ argument
3185 btrfs_printk_in_rcu(fs_info, KERN_INFO fmt, ##args)
3190 #define btrfs_emerg_rl_in_rcu(fs_info, fmt, args...) \ argument
3191 btrfs_printk_rl_in_rcu(fs_info, KERN_EMERG fmt, ##args)
3192 #define btrfs_alert_rl_in_rcu(fs_info, fmt, args...) \ argument
3193 btrfs_printk_rl_in_rcu(fs_info, KERN_ALERT fmt, ##args)
3194 #define btrfs_crit_rl_in_rcu(fs_info, fmt, args...) \ argument
3195 btrfs_printk_rl_in_rcu(fs_info, KERN_CRIT fmt, ##args)
3196 #define btrfs_err_rl_in_rcu(fs_info, fmt, args...) \ argument
3197 btrfs_printk_rl_in_rcu(fs_info, KERN_ERR fmt, ##args)
3198 #define btrfs_warn_rl_in_rcu(fs_info, fmt, args...) \ argument
3199 btrfs_printk_rl_in_rcu(fs_info, KERN_WARNING fmt, ##args)
3200 #define btrfs_notice_rl_in_rcu(fs_info, fmt, args...) \ argument
3201 btrfs_printk_rl_in_rcu(fs_info, KERN_NOTICE fmt, ##args)
3202 #define btrfs_info_rl_in_rcu(fs_info, fmt, args...) \ argument
3203 btrfs_printk_rl_in_rcu(fs_info, KERN_INFO fmt, ##args)
3208 #define btrfs_emerg_rl(fs_info, fmt, args...) \ argument
3209 btrfs_printk_ratelimited(fs_info, KERN_EMERG fmt, ##args)
3210 #define btrfs_alert_rl(fs_info, fmt, args...) \ argument
3211 btrfs_printk_ratelimited(fs_info, KERN_ALERT fmt, ##args)
3212 #define btrfs_crit_rl(fs_info, fmt, args...) \ argument
3213 btrfs_printk_ratelimited(fs_info, KERN_CRIT fmt, ##args)
3214 #define btrfs_err_rl(fs_info, fmt, args...) \ argument
3215 btrfs_printk_ratelimited(fs_info, KERN_ERR fmt, ##args)
3216 #define btrfs_warn_rl(fs_info, fmt, args...) \ argument
3217 btrfs_printk_ratelimited(fs_info, KERN_WARNING fmt, ##args)
3218 #define btrfs_notice_rl(fs_info, fmt, args...) \ argument
3219 btrfs_printk_ratelimited(fs_info, KERN_NOTICE fmt, ##args)
3220 #define btrfs_info_rl(fs_info, fmt, args...) \ argument
3221 btrfs_printk_ratelimited(fs_info, KERN_INFO fmt, ##args)
3224 #define btrfs_debug(fs_info, fmt, args...) \ argument
3226 fs_info, KERN_DEBUG fmt, ##args)
3227 #define btrfs_debug_in_rcu(fs_info, fmt, args...) \ argument
3229 fs_info, KERN_DEBUG fmt, ##args)
3230 #define btrfs_debug_rl_in_rcu(fs_info, fmt, args...) \ argument
3232 fs_info, KERN_DEBUG fmt, ##args)
3233 #define btrfs_debug_rl(fs_info, fmt, args...) \ argument
3235 fs_info, KERN_DEBUG fmt, ##args)
3237 #define btrfs_debug(fs_info, fmt, args...) \ argument
3238 btrfs_printk(fs_info, KERN_DEBUG fmt, ##args)
3239 #define btrfs_debug_in_rcu(fs_info, fmt, args...) \ argument
3240 btrfs_printk_in_rcu(fs_info, KERN_DEBUG fmt, ##args)
3241 #define btrfs_debug_rl_in_rcu(fs_info, fmt, args...) \ argument
3242 btrfs_printk_rl_in_rcu(fs_info, KERN_DEBUG fmt, ##args)
3243 #define btrfs_debug_rl(fs_info, fmt, args...) \ argument
3244 btrfs_printk_ratelimited(fs_info, KERN_DEBUG fmt, ##args)
3246 #define btrfs_debug(fs_info, fmt, args...) \ argument
3247 btrfs_no_printk(fs_info, KERN_DEBUG fmt, ##args)
3248 #define btrfs_debug_in_rcu(fs_info, fmt, args...) \ argument
3249 btrfs_no_printk_in_rcu(fs_info, KERN_DEBUG fmt, ##args)
3250 #define btrfs_debug_rl_in_rcu(fs_info, fmt, args...) \ argument
3251 btrfs_no_printk_in_rcu(fs_info, KERN_DEBUG fmt, ##args)
3252 #define btrfs_debug_rl(fs_info, fmt, args...) \ argument
3253 btrfs_no_printk(fs_info, KERN_DEBUG fmt, ##args)
3256 #define btrfs_printk_in_rcu(fs_info, fmt, args...) \ argument
3259 btrfs_printk(fs_info, fmt, ##args); \
3263 #define btrfs_no_printk_in_rcu(fs_info, fmt, args...) \ argument
3266 btrfs_no_printk(fs_info, fmt, ##args); \
3270 #define btrfs_printk_ratelimited(fs_info, fmt, args...) \ argument
3276 btrfs_printk(fs_info, fmt, ##args); \
3279 #define btrfs_printk_rl_in_rcu(fs_info, fmt, args...) \ argument
3282 btrfs_printk_ratelimited(fs_info, fmt, ##args); \
3313 static inline void btrfs_print_v0_err(struct btrfs_fs_info *fs_info) in btrfs_print_v0_err() argument
3315 btrfs_err(fs_info, in btrfs_print_v0_err()
3321 void __btrfs_handle_fs_error(struct btrfs_fs_info *fs_info, const char *function,
3339 &((trans)->fs_info->fs_state))) { \
3345 btrfs_debug((trans)->fs_info, \
3354 #define btrfs_handle_fs_error(fs_info, errno, fmt, args...) \ argument
3356 __btrfs_handle_fs_error((fs_info), __func__, __LINE__, \
3362 void __btrfs_panic(struct btrfs_fs_info *fs_info, const char *function,
3368 #define btrfs_panic(fs_info, errno, fmt, args...) \ argument
3370 __btrfs_panic(fs_info, __func__, __LINE__, errno, fmt, ##args); \
3381 static inline void __btrfs_set_fs_incompat(struct btrfs_fs_info *fs_info, in __btrfs_set_fs_incompat() argument
3387 disk_super = fs_info->super_copy; in __btrfs_set_fs_incompat()
3390 spin_lock(&fs_info->super_lock); in __btrfs_set_fs_incompat()
3395 btrfs_info(fs_info, in __btrfs_set_fs_incompat()
3399 spin_unlock(&fs_info->super_lock); in __btrfs_set_fs_incompat()
3407 static inline void __btrfs_clear_fs_incompat(struct btrfs_fs_info *fs_info, in __btrfs_clear_fs_incompat() argument
3413 disk_super = fs_info->super_copy; in __btrfs_clear_fs_incompat()
3416 spin_lock(&fs_info->super_lock); in __btrfs_clear_fs_incompat()
3421 btrfs_info(fs_info, in __btrfs_clear_fs_incompat()
3425 spin_unlock(&fs_info->super_lock); in __btrfs_clear_fs_incompat()
3429 #define btrfs_fs_incompat(fs_info, opt) \ argument
3430 __btrfs_fs_incompat((fs_info), BTRFS_FEATURE_INCOMPAT_##opt)
3432 static inline bool __btrfs_fs_incompat(struct btrfs_fs_info *fs_info, u64 flag) in __btrfs_fs_incompat() argument
3435 disk_super = fs_info->super_copy; in __btrfs_fs_incompat()
3443 static inline void __btrfs_set_fs_compat_ro(struct btrfs_fs_info *fs_info, in __btrfs_set_fs_compat_ro() argument
3449 disk_super = fs_info->super_copy; in __btrfs_set_fs_compat_ro()
3452 spin_lock(&fs_info->super_lock); in __btrfs_set_fs_compat_ro()
3457 btrfs_info(fs_info, in __btrfs_set_fs_compat_ro()
3461 spin_unlock(&fs_info->super_lock); in __btrfs_set_fs_compat_ro()
3469 static inline void __btrfs_clear_fs_compat_ro(struct btrfs_fs_info *fs_info, in __btrfs_clear_fs_compat_ro() argument
3475 disk_super = fs_info->super_copy; in __btrfs_clear_fs_compat_ro()
3478 spin_lock(&fs_info->super_lock); in __btrfs_clear_fs_compat_ro()
3483 btrfs_info(fs_info, in __btrfs_clear_fs_compat_ro()
3487 spin_unlock(&fs_info->super_lock); in __btrfs_clear_fs_compat_ro()
3491 #define btrfs_fs_compat_ro(fs_info, opt) \ argument
3492 __btrfs_fs_compat_ro((fs_info), BTRFS_FEATURE_COMPAT_RO_##opt)
3494 static inline int __btrfs_fs_compat_ro(struct btrfs_fs_info *fs_info, u64 flag) in __btrfs_fs_compat_ro() argument
3497 disk_super = fs_info->super_copy; in __btrfs_fs_compat_ro()
3518 int btrfs_relocate_block_group(struct btrfs_fs_info *fs_info, u64 group_start);
3532 int btrfs_should_cancel_balance(struct btrfs_fs_info *fs_info);
3533 struct btrfs_root *find_reloc_root(struct btrfs_fs_info *fs_info,
3538 int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start,
3541 void btrfs_scrub_pause(struct btrfs_fs_info *fs_info);
3542 void btrfs_scrub_continue(struct btrfs_fs_info *fs_info);
3545 int btrfs_scrub_progress(struct btrfs_fs_info *fs_info, u64 devid,
3555 void btrfs_bio_counter_inc_blocked(struct btrfs_fs_info *fs_info);
3556 void btrfs_bio_counter_inc_noblocked(struct btrfs_fs_info *fs_info);
3557 void btrfs_bio_counter_sub(struct btrfs_fs_info *fs_info, s64 amount);
3559 static inline void btrfs_bio_counter_dec(struct btrfs_fs_info *fs_info) in btrfs_bio_counter_dec() argument
3561 btrfs_bio_counter_sub(fs_info, 1); in btrfs_bio_counter_dec()
3566 struct btrfs_fs_info *fs_info; /* tree to prefetch */ member
3590 static inline int btrfs_defrag_cancelled(struct btrfs_fs_info *fs_info) in btrfs_defrag_cancelled() argument
3600 static inline int btrfs_is_testing(struct btrfs_fs_info *fs_info) in btrfs_is_testing() argument
3602 return test_bit(BTRFS_FS_STATE_DUMMY_FS_INFO, &fs_info->fs_state); in btrfs_is_testing()
3605 static inline int btrfs_is_testing(struct btrfs_fs_info *fs_info) in btrfs_is_testing() argument