diff options
author | Chris Mason <chris.mason@oracle.com> | 2011-11-06 09:05:08 +0100 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-11-06 09:05:08 +0100 |
commit | 531f4b1ae5e0fc8c9b3f03838218e5ea178f80d3 (patch) | |
tree | 63efdfe9b192243fefb76be3921b9a2aaa26291e /fs/btrfs/volumes.c | |
parent | Btrfs: fix delayed insertion reservation (diff) | |
parent | btrfs: use readahead API for scrub (diff) | |
download | linux-531f4b1ae5e0fc8c9b3f03838218e5ea178f80d3.tar.xz linux-531f4b1ae5e0fc8c9b3f03838218e5ea178f80d3.zip |
Merge branch 'for-chris' of git://github.com/sensille/linux into integration
Conflicts:
fs/btrfs/ctree.h
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r-- | fs/btrfs/volumes.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index c3b45564048e..f1685a2b45c8 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -366,6 +366,14 @@ static noinline int device_list_add(const char *path, } INIT_LIST_HEAD(&device->dev_alloc_list); + /* init readahead state */ + spin_lock_init(&device->reada_lock); + device->reada_curr_zone = NULL; + atomic_set(&device->reada_in_flight, 0); + device->reada_next = 0; + INIT_RADIX_TREE(&device->reada_zones, GFP_NOFS & ~__GFP_WAIT); + INIT_RADIX_TREE(&device->reada_extents, GFP_NOFS & ~__GFP_WAIT); + mutex_lock(&fs_devices->device_list_mutex); list_add_rcu(&device->dev_list, &fs_devices->devices); mutex_unlock(&fs_devices->device_list_mutex); |