disk-io.c (7b4397386fbdc606eb053bc2a1cfd985aea59916) | disk-io.c (43eb5f2975848743e5b14c5bef20f40d404a7a04) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2007 Oracle. All rights reserved. 4 */ 5 6#include <linux/fs.h> 7#include <linux/blkdev.h> 8#include <linux/radix-tree.h> --- 1197 unchanged lines hidden (view full) --- 1206 refcount_set(&root->refs, 1); 1207 atomic_set(&root->will_be_snapshotted, 0); 1208 atomic_set(&root->snapshot_force_cow, 0); 1209 atomic_set(&root->nr_swapfiles, 0); 1210 root->log_transid = 0; 1211 root->log_transid_committed = -1; 1212 root->last_log_commit = 0; 1213 if (!dummy) | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2007 Oracle. All rights reserved. 4 */ 5 6#include <linux/fs.h> 7#include <linux/blkdev.h> 8#include <linux/radix-tree.h> --- 1197 unchanged lines hidden (view full) --- 1206 refcount_set(&root->refs, 1); 1207 atomic_set(&root->will_be_snapshotted, 0); 1208 atomic_set(&root->snapshot_force_cow, 0); 1209 atomic_set(&root->nr_swapfiles, 0); 1210 root->log_transid = 0; 1211 root->log_transid_committed = -1; 1212 root->last_log_commit = 0; 1213 if (!dummy) |
1214 extent_io_tree_init(fs_info, &root->dirty_log_pages, NULL); | 1214 extent_io_tree_init(fs_info, &root->dirty_log_pages, 1215 IO_TREE_ROOT_DIRTY_LOG_PAGES, NULL); |
1215 1216 memset(&root->root_key, 0, sizeof(root->root_key)); 1217 memset(&root->root_item, 0, sizeof(root->root_item)); 1218 memset(&root->defrag_progress, 0, sizeof(root->defrag_progress)); 1219 if (!dummy) 1220 root->defrag_trans_start = fs_info->generation; 1221 else 1222 root->defrag_trans_start = 0; --- 913 unchanged lines hidden (view full) --- 2136 * we set the i_size on the btree inode to the max possible int. 2137 * the real end of the address space is determined by all of 2138 * the devices in the system 2139 */ 2140 inode->i_size = OFFSET_MAX; 2141 inode->i_mapping->a_ops = &btree_aops; 2142 2143 RB_CLEAR_NODE(&BTRFS_I(inode)->rb_node); | 1216 1217 memset(&root->root_key, 0, sizeof(root->root_key)); 1218 memset(&root->root_item, 0, sizeof(root->root_item)); 1219 memset(&root->defrag_progress, 0, sizeof(root->defrag_progress)); 1220 if (!dummy) 1221 root->defrag_trans_start = fs_info->generation; 1222 else 1223 root->defrag_trans_start = 0; --- 913 unchanged lines hidden (view full) --- 2137 * we set the i_size on the btree inode to the max possible int. 2138 * the real end of the address space is determined by all of 2139 * the devices in the system 2140 */ 2141 inode->i_size = OFFSET_MAX; 2142 inode->i_mapping->a_ops = &btree_aops; 2143 2144 RB_CLEAR_NODE(&BTRFS_I(inode)->rb_node); |
2144 extent_io_tree_init(fs_info, &BTRFS_I(inode)->io_tree, inode); | 2145 extent_io_tree_init(fs_info, &BTRFS_I(inode)->io_tree, 2146 IO_TREE_INODE_IO, inode); |
2145 BTRFS_I(inode)->io_tree.track_uptodate = false; 2146 extent_map_tree_init(&BTRFS_I(inode)->extent_tree); 2147 2148 BTRFS_I(inode)->io_tree.ops = &btree_extent_io_ops; 2149 2150 BTRFS_I(inode)->root = fs_info->tree_root; 2151 memset(&BTRFS_I(inode)->location, 0, sizeof(struct btrfs_key)); 2152 set_bit(BTRFS_INODE_DUMMY, &BTRFS_I(inode)->runtime_flags); --- 593 unchanged lines hidden (view full) --- 2746 sb->s_blocksize_bits = blksize_bits(BTRFS_BDEV_BLOCKSIZE); 2747 2748 btrfs_init_btree_inode(fs_info); 2749 2750 spin_lock_init(&fs_info->block_group_cache_lock); 2751 fs_info->block_group_cache_tree = RB_ROOT; 2752 fs_info->first_logical_byte = (u64)-1; 2753 | 2147 BTRFS_I(inode)->io_tree.track_uptodate = false; 2148 extent_map_tree_init(&BTRFS_I(inode)->extent_tree); 2149 2150 BTRFS_I(inode)->io_tree.ops = &btree_extent_io_ops; 2151 2152 BTRFS_I(inode)->root = fs_info->tree_root; 2153 memset(&BTRFS_I(inode)->location, 0, sizeof(struct btrfs_key)); 2154 set_bit(BTRFS_INODE_DUMMY, &BTRFS_I(inode)->runtime_flags); --- 593 unchanged lines hidden (view full) --- 2748 sb->s_blocksize_bits = blksize_bits(BTRFS_BDEV_BLOCKSIZE); 2749 2750 btrfs_init_btree_inode(fs_info); 2751 2752 spin_lock_init(&fs_info->block_group_cache_lock); 2753 fs_info->block_group_cache_tree = RB_ROOT; 2754 fs_info->first_logical_byte = (u64)-1; 2755 |
2754 extent_io_tree_init(fs_info, &fs_info->freed_extents[0], NULL); 2755 extent_io_tree_init(fs_info, &fs_info->freed_extents[1], NULL); | 2756 extent_io_tree_init(fs_info, &fs_info->freed_extents[0], 2757 IO_TREE_FS_INFO_FREED_EXTENTS0, NULL); 2758 extent_io_tree_init(fs_info, &fs_info->freed_extents[1], 2759 IO_TREE_FS_INFO_FREED_EXTENTS1, NULL); |
2756 fs_info->pinned_extents = &fs_info->freed_extents[0]; 2757 set_bit(BTRFS_FS_BARRIER, &fs_info->flags); 2758 2759 mutex_init(&fs_info->ordered_operations_mutex); 2760 mutex_init(&fs_info->tree_log_mutex); 2761 mutex_init(&fs_info->chunk_mutex); 2762 mutex_init(&fs_info->transaction_kthread_mutex); 2763 mutex_init(&fs_info->cleaner_mutex); --- 1808 unchanged lines hidden --- | 2760 fs_info->pinned_extents = &fs_info->freed_extents[0]; 2761 set_bit(BTRFS_FS_BARRIER, &fs_info->flags); 2762 2763 mutex_init(&fs_info->ordered_operations_mutex); 2764 mutex_init(&fs_info->tree_log_mutex); 2765 mutex_init(&fs_info->chunk_mutex); 2766 mutex_init(&fs_info->transaction_kthread_mutex); 2767 mutex_init(&fs_info->cleaner_mutex); --- 1808 unchanged lines hidden --- |