diff options
author | Josef Bacik <josef@redhat.com> | 2010-03-19 14:07:23 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2010-03-30 21:19:09 -0400 |
commit | 287a0ab91d25ca982f895a76402e5893b47ed7a6 (patch) | |
tree | fcbe35daef2b4cbdc2bfc0c6026e7c45faef0245 /fs/btrfs/ordered-data.c | |
parent | 1b1d1f6625e517a08640ddb4b8f8a0e025243fe3 (diff) |
Btrfs: kill max_extent mount option
As Yan pointed out, theres not much reason for all this complicated math to
account for file extents being split up into max_extent chunks, since they are
likely to all end up in the same leaf anyway. Since there isn't much reason to
use max_extent, just remove the option altogether so we have one less thing we
need to test.
Signed-off-by: Josef Bacik <josef@redhat.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 | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c index a8ffecd0b491..5c99882b9763 100644 --- a/fs/btrfs/ordered-data.c +++ b/fs/btrfs/ordered-data.c | |||
@@ -303,6 +303,7 @@ static int __btrfs_remove_ordered_extent(struct inode *inode, | |||
303 | struct btrfs_ordered_extent *entry) | 303 | struct btrfs_ordered_extent *entry) |
304 | { | 304 | { |
305 | struct btrfs_ordered_inode_tree *tree; | 305 | struct btrfs_ordered_inode_tree *tree; |
306 | struct btrfs_root *root = BTRFS_I(inode)->root; | ||
306 | struct rb_node *node; | 307 | struct rb_node *node; |
307 | 308 | ||
308 | tree = &BTRFS_I(inode)->ordered_tree; | 309 | tree = &BTRFS_I(inode)->ordered_tree; |
@@ -312,12 +313,13 @@ static int __btrfs_remove_ordered_extent(struct inode *inode, | |||
312 | set_bit(BTRFS_ORDERED_COMPLETE, &entry->flags); | 313 | set_bit(BTRFS_ORDERED_COMPLETE, &entry->flags); |
313 | 314 | ||
314 | spin_lock(&BTRFS_I(inode)->accounting_lock); | 315 | spin_lock(&BTRFS_I(inode)->accounting_lock); |
316 | WARN_ON(!BTRFS_I(inode)->outstanding_extents); | ||
315 | BTRFS_I(inode)->outstanding_extents--; | 317 | BTRFS_I(inode)->outstanding_extents--; |
316 | spin_unlock(&BTRFS_I(inode)->accounting_lock); | 318 | spin_unlock(&BTRFS_I(inode)->accounting_lock); |
317 | btrfs_unreserve_metadata_for_delalloc(BTRFS_I(inode)->root, | 319 | btrfs_unreserve_metadata_for_delalloc(BTRFS_I(inode)->root, |
318 | inode, 1); | 320 | inode, 1); |
319 | 321 | ||
320 | spin_lock(&BTRFS_I(inode)->root->fs_info->ordered_extent_lock); | 322 | spin_lock(&root->fs_info->ordered_extent_lock); |
321 | list_del_init(&entry->root_extent_list); | 323 | list_del_init(&entry->root_extent_list); |
322 | 324 | ||
323 | /* | 325 | /* |
@@ -329,7 +331,7 @@ static int __btrfs_remove_ordered_extent(struct inode *inode, | |||
329 | !mapping_tagged(inode->i_mapping, PAGECACHE_TAG_DIRTY)) { | 331 | !mapping_tagged(inode->i_mapping, PAGECACHE_TAG_DIRTY)) { |
330 | list_del_init(&BTRFS_I(inode)->ordered_operations); | 332 | list_del_init(&BTRFS_I(inode)->ordered_operations); |
331 | } | 333 | } |
332 | spin_unlock(&BTRFS_I(inode)->root->fs_info->ordered_extent_lock); | 334 | spin_unlock(&root->fs_info->ordered_extent_lock); |
333 | 335 | ||
334 | return 0; | 336 | return 0; |
335 | } | 337 | } |