diff options
author | Yan, Zheng <zheng.yan@oracle.com> | 2010-05-16 10:48:47 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2010-05-25 10:34:51 -0400 |
commit | 0ca1f7ceb1991099ed5273885ebcf4323948c72e (patch) | |
tree | 10758d6a55c529aced177da3f6bf45cf26361913 /fs/btrfs/ordered-data.c | |
parent | a22285a6a32390195235171b89d157ed1a1fe932 (diff) |
Btrfs: Update metadata reservation for delayed allocation
Introduce metadata reservation context for delayed allocation
and update various related functions.
This patch also introduces EXTENT_FIRST_DELALLOC control bit for
set/clear_extent_bit. It tells set/clear_bit_hook whether they
are processing the first extent_state with EXTENT_DELALLOC bit
set. This change is important if set/clear_extent_bit involves
multiple extent_state.
Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ordered-data.c')
-rw-r--r-- | fs/btrfs/ordered-data.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c index a127c0ebb2dc..c9f1020572f2 100644 --- a/fs/btrfs/ordered-data.c +++ b/fs/btrfs/ordered-data.c | |||
@@ -311,13 +311,6 @@ static int __btrfs_remove_ordered_extent(struct inode *inode, | |||
311 | tree->last = NULL; | 311 | tree->last = NULL; |
312 | set_bit(BTRFS_ORDERED_COMPLETE, &entry->flags); | 312 | set_bit(BTRFS_ORDERED_COMPLETE, &entry->flags); |
313 | 313 | ||
314 | spin_lock(&BTRFS_I(inode)->accounting_lock); | ||
315 | WARN_ON(!BTRFS_I(inode)->outstanding_extents); | ||
316 | BTRFS_I(inode)->outstanding_extents--; | ||
317 | spin_unlock(&BTRFS_I(inode)->accounting_lock); | ||
318 | btrfs_unreserve_metadata_for_delalloc(BTRFS_I(inode)->root, | ||
319 | inode, 1); | ||
320 | |||
321 | spin_lock(&root->fs_info->ordered_extent_lock); | 314 | spin_lock(&root->fs_info->ordered_extent_lock); |
322 | list_del_init(&entry->root_extent_list); | 315 | list_del_init(&entry->root_extent_list); |
323 | 316 | ||