btrfs_inode.h (7edd339c8a416afed9d58b5d20778d5ee49e079f) | btrfs_inode.h (fa4b8cb1738097586f49ec66cd3656cef47ac143) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * Copyright (C) 2007 Oracle. All rights reserved. 4 */ 5 6#ifndef BTRFS_INODE_H 7#define BTRFS_INODE_H 8 --- 128 unchanged lines hidden (view full) --- 137 /* 138 * log transid when this inode was last modified 139 */ 140 int last_sub_trans; 141 142 /* a local copy of root's last_log_commit */ 143 int last_log_commit; 144 | 1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * Copyright (C) 2007 Oracle. All rights reserved. 4 */ 5 6#ifndef BTRFS_INODE_H 7#define BTRFS_INODE_H 8 --- 128 unchanged lines hidden (view full) --- 137 /* 138 * log transid when this inode was last modified 139 */ 140 int last_sub_trans; 141 142 /* a local copy of root's last_log_commit */ 143 int last_log_commit; 144 |
145 /* 146 * Total number of bytes pending delalloc, used by stat to calculate the 147 * real block usage of the file. This is used only for files. 148 */ 149 u64 delalloc_bytes; | 145 union { 146 /* 147 * Total number of bytes pending delalloc, used by stat to 148 * calculate the real block usage of the file. This is used 149 * only for files. 150 */ 151 u64 delalloc_bytes; 152 /* 153 * The lowest possible index of the next dir index key which 154 * points to an inode that needs to be logged. 155 * This is used only for directories. 156 * Use the helpers btrfs_get_first_dir_index_to_log() and 157 * btrfs_set_first_dir_index_to_log() to access this field. 158 */ 159 u64 first_dir_index_to_log; 160 }; |
150 151 union { 152 /* 153 * Total number of bytes pending delalloc that fall within a file 154 * range that is either a hole or beyond EOF (and no prealloc extent 155 * exists in the range). This is always <= delalloc_bytes and this 156 * is used only for files. 157 */ --- 84 unchanged lines hidden (view full) --- 242 243 /* Hook into fs_info->delayed_iputs */ 244 struct list_head delayed_iput; 245 246 struct rw_semaphore i_mmap_lock; 247 struct inode vfs_inode; 248}; 249 | 161 162 union { 163 /* 164 * Total number of bytes pending delalloc that fall within a file 165 * range that is either a hole or beyond EOF (and no prealloc extent 166 * exists in the range). This is always <= delalloc_bytes and this 167 * is used only for files. 168 */ --- 84 unchanged lines hidden (view full) --- 253 254 /* Hook into fs_info->delayed_iputs */ 255 struct list_head delayed_iput; 256 257 struct rw_semaphore i_mmap_lock; 258 struct inode vfs_inode; 259}; 260 |
261static inline u64 btrfs_get_first_dir_index_to_log(const struct btrfs_inode *inode) 262{ 263 return READ_ONCE(inode->first_dir_index_to_log); 264} 265 266static inline void btrfs_set_first_dir_index_to_log(struct btrfs_inode *inode, 267 u64 index) 268{ 269 WRITE_ONCE(inode->first_dir_index_to_log, index); 270} 271 |
|
250static inline struct btrfs_inode *BTRFS_I(const struct inode *inode) 251{ 252 return container_of(inode, struct btrfs_inode, vfs_inode); 253} 254 255static inline unsigned long btrfs_inode_hash(u64 objectid, 256 const struct btrfs_root *root) 257{ --- 280 unchanged lines hidden --- | 272static inline struct btrfs_inode *BTRFS_I(const struct inode *inode) 273{ 274 return container_of(inode, struct btrfs_inode, vfs_inode); 275} 276 277static inline unsigned long btrfs_inode_hash(u64 objectid, 278 const struct btrfs_root *root) 279{ --- 280 unchanged lines hidden --- |