aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-01-24 16:13:08 -0500
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:03:59 -0400
commitd1310b2e0cd98eb1348553e69b73827b436dca7b (patch)
treef55e9c380df0f3a7e9fb792b2308b52b632b90aa /fs/btrfs/super.c
parent5f56406aabdf5444d040c5955effc665b1d0dbaf (diff)
Btrfs: Split the extent_map code into two parts
There is now extent_map for mapping offsets in the file to disk and extent_io for state tracking, IO submission and extent_bufers. The new extent_map code shifts from [start,end] pairs to [start,len], and pushes the locking out into the caller. This allows a few performance optimizations and is easier to use. A number of extent_map usage bugs were fixed, mostly with failing to remove extent_map entries when changing the file. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 8b52c69fda2e..f8a1016600b1 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -468,10 +468,15 @@ static int __init init_btrfs_fs(void)
468 err = btrfs_init_cachep(); 468 err = btrfs_init_cachep();
469 if (err) 469 if (err)
470 goto free_transaction_sys; 470 goto free_transaction_sys;
471 err = extent_map_init(); 471
472 err = extent_io_init();
472 if (err) 473 if (err)
473 goto free_cachep; 474 goto free_cachep;
474 475
476 err = extent_map_init();
477 if (err)
478 goto free_extent_io;
479
475 err = register_filesystem(&btrfs_fs_type); 480 err = register_filesystem(&btrfs_fs_type);
476 if (err) 481 if (err)
477 goto free_extent_map; 482 goto free_extent_map;
@@ -479,6 +484,8 @@ static int __init init_btrfs_fs(void)
479 484
480free_extent_map: 485free_extent_map:
481 extent_map_exit(); 486 extent_map_exit();
487free_extent_io:
488 extent_io_exit();
482free_cachep: 489free_cachep:
483 btrfs_destroy_cachep(); 490 btrfs_destroy_cachep();
484free_transaction_sys: 491free_transaction_sys:
@@ -492,6 +499,7 @@ static void __exit exit_btrfs_fs(void)
492 btrfs_exit_transaction_sys(); 499 btrfs_exit_transaction_sys();
493 btrfs_destroy_cachep(); 500 btrfs_destroy_cachep();
494 extent_map_exit(); 501 extent_map_exit();
502 extent_io_exit();
495 unregister_filesystem(&btrfs_fs_type); 503 unregister_filesystem(&btrfs_fs_type);
496 btrfs_exit_sysfs(); 504 btrfs_exit_sysfs();
497} 505}