diff options
Diffstat (limited to 'fs/btrfs/btrfs_inode.h')
-rw-r--r-- | fs/btrfs/btrfs_inode.h | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index 72677ce2b74f..b30986f00b9d 100644 --- a/fs/btrfs/btrfs_inode.h +++ b/fs/btrfs/btrfs_inode.h | |||
@@ -66,6 +66,12 @@ struct btrfs_inode { | |||
66 | */ | 66 | */ |
67 | struct list_head delalloc_inodes; | 67 | struct list_head delalloc_inodes; |
68 | 68 | ||
69 | /* | ||
70 | * list for tracking inodes that must be sent to disk before a | ||
71 | * rename or truncate commit | ||
72 | */ | ||
73 | struct list_head ordered_operations; | ||
74 | |||
69 | /* the space_info for where this inode's data allocations are done */ | 75 | /* the space_info for where this inode's data allocations are done */ |
70 | struct btrfs_space_info *space_info; | 76 | struct btrfs_space_info *space_info; |
71 | 77 | ||
@@ -86,12 +92,6 @@ struct btrfs_inode { | |||
86 | */ | 92 | */ |
87 | u64 logged_trans; | 93 | u64 logged_trans; |
88 | 94 | ||
89 | /* | ||
90 | * trans that last made a change that should be fully fsync'd. This | ||
91 | * gets reset to zero each time the inode is logged | ||
92 | */ | ||
93 | u64 log_dirty_trans; | ||
94 | |||
95 | /* total number of bytes pending delalloc, used by stat to calc the | 95 | /* total number of bytes pending delalloc, used by stat to calc the |
96 | * real block usage of the file | 96 | * real block usage of the file |
97 | */ | 97 | */ |
@@ -121,6 +121,25 @@ struct btrfs_inode { | |||
121 | /* the start of block group preferred for allocations. */ | 121 | /* the start of block group preferred for allocations. */ |
122 | u64 block_group; | 122 | u64 block_group; |
123 | 123 | ||
124 | /* the fsync log has some corner cases that mean we have to check | ||
125 | * directories to see if any unlinks have been done before | ||
126 | * the directory was logged. See tree-log.c for all the | ||
127 | * details | ||
128 | */ | ||
129 | u64 last_unlink_trans; | ||
130 | |||
131 | /* | ||
132 | * ordered_data_close is set by truncate when a file that used | ||
133 | * to have good data has been truncated to zero. When it is set | ||
134 | * the btrfs file release call will add this inode to the | ||
135 | * ordered operations list so that we make sure to flush out any | ||
136 | * new data the application may have written before commit. | ||
137 | * | ||
138 | * yes, its silly to have a single bitflag, but we might grow more | ||
139 | * of these. | ||
140 | */ | ||
141 | unsigned ordered_data_close:1; | ||
142 | |||
124 | struct inode vfs_inode; | 143 | struct inode vfs_inode; |
125 | }; | 144 | }; |
126 | 145 | ||