diff options
author | Chris Mason <chris.mason@oracle.com> | 2011-11-06 12:05:08 +0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-11-06 12:05:08 +0400 |
commit | 531f4b1ae5e0fc8c9b3f03838218e5ea178f80d3 (patch) | |
tree | 63efdfe9b192243fefb76be3921b9a2aaa26291e /fs/btrfs/volumes.c | |
parent | c06a0e120a4e381a1c291c1fce3c6155c5791cae (diff) | |
parent | 7a26285eea8eb92e0088db011571d887d4551b0f (diff) | |
download | linux-531f4b1ae5e0fc8c9b3f03838218e5ea178f80d3.tar.xz |
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); |