Lines Matching +full:setup +full:- +full:duration +full:- +full:ns

1 /* SPDX-License-Identifier: GPL-2.0 */
21 #include <linux/radix-tree.h>
29 #include "extent-io-tree.h"
30 #include "async-thread.h"
31 #include "block-rsv.h"
95 * Runtime (in-memory) states of filesystem
114 /* The btrfs_fs_info created for self-tests */
324 /* Seconds since 1-Jan-1970 */
326 /* Seconds since 1-Jan-1970 */
432 /* The maximum commit duration so far in ns */
434 /* The last commit duration in ns */
436 /* The total commit duration in ns */
438 /* Start of the last critical section in ns. */
475 /* logical->physical extent mapping */
532 * extent. The write side(mount/remount) is under ->s_umount lock,
579 * function happens to be doing non-waiting preflush before jumping
615 /* This is used to protect the following list -- ordered_roots. */
690 * The space_info list is effectively read only after initial setup.
794 /* Entries are eb->start >> nodesize_bits */
885 * Last generation where we dropped a non-relocation root.
914 struct folio *: (_folio))->mapping->host))
916 #define folio_to_fs_info(_folio) (folio_to_inode(_folio)->root->fs_info)
919 struct inode *: (_inode)))->root->fs_info)
929 return 1U << (PAGE_SHIFT + fs_info->block_min_order); in btrfs_min_folio_size()
934 return READ_ONCE(fs_info->generation); in btrfs_get_fs_generation()
939 WRITE_ONCE(fs_info->generation, gen); in btrfs_set_fs_generation()
944 return READ_ONCE(fs_info->last_trans_committed); in btrfs_get_last_trans_committed()
949 WRITE_ONCE(fs_info->last_trans_committed, gen); in btrfs_set_last_trans_committed()
955 WRITE_ONCE(fs_info->last_root_drop_gen, gen); in btrfs_set_last_root_drop_gen()
960 return READ_ONCE(fs_info->last_root_drop_gen); in btrfs_get_last_root_drop_gen()
970 const u64 num_csums = csum_bytes >> fs_info->sectorsize_bits; in btrfs_csum_bytes_to_leaves()
972 return DIV_ROUND_UP_ULL(num_csums, fs_info->csums_per_leaf); in btrfs_csum_bytes_to_leaves()
982 return (u64)fs_info->nodesize * BTRFS_MAX_LEVEL * 2 * num_items; in btrfs_calc_insert_metadata_size()
992 return (u64)fs_info->nodesize * BTRFS_MAX_LEVEL * num_items; in btrfs_calc_metadata_size()
995 #define BTRFS_MAX_EXTENT_ITEM_SIZE(r) ((BTRFS_LEAF_DATA_SIZE(r->fs_info) >> 4) - \
998 #define BTRFS_BYTES_TO_BLKS(fs_info, bytes) ((bytes) >> (fs_info)->sectorsize_bits)
1002 return IS_ENABLED(CONFIG_BLK_DEV_ZONED) && fs_info->zone_size > 0; in btrfs_is_zoned()
1006 * Count how many fs_info->max_extent_size cover the @size
1012 return div_u64(size + BTRFS_MAX_EXTENT_SIZE - 1, BTRFS_MAX_EXTENT_SIZE); in count_max_extents()
1015 return div_u64(size + fs_info->max_extent_size - 1, fs_info->max_extent_size); in count_max_extents()
1021 return folio_size(folio) >> fs_info->sectorsize_bits; in btrfs_blocks_per_folio()
1058 (!!(btrfs_super_incompat_flags((fs_info)->super_copy) & (flags)))
1061 (!!(btrfs_super_compat_ro_flags((fs_info)->super_copy) & (flags)))
1084 #define btrfs_test_opt(fs_info, opt) ((fs_info)->mount_opt & \
1090 if (test_bit(BTRFS_FS_CLOSING_START, &fs_info->flags)) { in btrfs_fs_closing()
1091 if (test_bit(BTRFS_FS_CLOSING_DONE, &fs_info->flags)) in btrfs_fs_closing()
1108 return test_bit(BTRFS_FS_STATE_RO, &fs_info->fs_state) || in btrfs_need_cleaner_sleep()
1114 clear_and_wake_up_bit(BTRFS_FS_UNFINISHED_DROPS, &fs_info->flags); in btrfs_wake_unfinished_drop()
1117 #define BTRFS_FS_ERROR(fs_info) (READ_ONCE((fs_info)->fs_error))
1121 &(fs_info)->fs_state)))
1137 return unlikely(test_bit(BTRFS_FS_STATE_DUMMY_FS_INFO, &fs_info->fs_state)); in btrfs_is_testing()