Commit 21ca543e authored by Ilya Dryomov's avatar Ilya Dryomov Committed by Chris Mason

Btrfs: rename btrfs_bio multi -> bbio for consistency

Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 9510dc4c
...@@ -247,7 +247,7 @@ int btree_readahead_hook(struct btrfs_root *root, struct extent_buffer *eb, ...@@ -247,7 +247,7 @@ int btree_readahead_hook(struct btrfs_root *root, struct extent_buffer *eb,
static struct reada_zone *reada_find_zone(struct btrfs_fs_info *fs_info, static struct reada_zone *reada_find_zone(struct btrfs_fs_info *fs_info,
struct btrfs_device *dev, u64 logical, struct btrfs_device *dev, u64 logical,
struct btrfs_bio *multi) struct btrfs_bio *bbio)
{ {
int ret; int ret;
int looped = 0; int looped = 0;
...@@ -297,11 +297,11 @@ static struct reada_zone *reada_find_zone(struct btrfs_fs_info *fs_info, ...@@ -297,11 +297,11 @@ static struct reada_zone *reada_find_zone(struct btrfs_fs_info *fs_info,
kref_init(&zone->refcnt); kref_init(&zone->refcnt);
zone->elems = 0; zone->elems = 0;
zone->device = dev; /* our device always sits at index 0 */ zone->device = dev; /* our device always sits at index 0 */
for (i = 0; i < multi->num_stripes; ++i) { for (i = 0; i < bbio->num_stripes; ++i) {
/* bounds have already been checked */ /* bounds have already been checked */
zone->devs[i] = multi->stripes[i].dev; zone->devs[i] = bbio->stripes[i].dev;
} }
zone->ndevs = multi->num_stripes; zone->ndevs = bbio->num_stripes;
spin_lock(&fs_info->reada_lock); spin_lock(&fs_info->reada_lock);
ret = radix_tree_insert(&dev->reada_zones, ret = radix_tree_insert(&dev->reada_zones,
...@@ -327,7 +327,7 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root, ...@@ -327,7 +327,7 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root,
struct reada_extent *re = NULL; struct reada_extent *re = NULL;
struct btrfs_fs_info *fs_info = root->fs_info; struct btrfs_fs_info *fs_info = root->fs_info;
struct btrfs_mapping_tree *map_tree = &fs_info->mapping_tree; struct btrfs_mapping_tree *map_tree = &fs_info->mapping_tree;
struct btrfs_bio *multi = NULL; struct btrfs_bio *bbio = NULL;
struct btrfs_device *dev; struct btrfs_device *dev;
u32 blocksize; u32 blocksize;
u64 length; u64 length;
...@@ -361,21 +361,21 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root, ...@@ -361,21 +361,21 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root,
* map block * map block
*/ */
length = blocksize; length = blocksize;
ret = btrfs_map_block(map_tree, REQ_WRITE, logical, &length, &multi, 0); ret = btrfs_map_block(map_tree, REQ_WRITE, logical, &length, &bbio, 0);
if (ret || !multi || length < blocksize) if (ret || !bbio || length < blocksize)
goto error; goto error;
if (multi->num_stripes > MAX_MIRRORS) { if (bbio->num_stripes > MAX_MIRRORS) {
printk(KERN_ERR "btrfs readahead: more than %d copies not " printk(KERN_ERR "btrfs readahead: more than %d copies not "
"supported", MAX_MIRRORS); "supported", MAX_MIRRORS);
goto error; goto error;
} }
for (nzones = 0; nzones < multi->num_stripes; ++nzones) { for (nzones = 0; nzones < bbio->num_stripes; ++nzones) {
struct reada_zone *zone; struct reada_zone *zone;
dev = multi->stripes[nzones].dev; dev = bbio->stripes[nzones].dev;
zone = reada_find_zone(fs_info, dev, logical, multi); zone = reada_find_zone(fs_info, dev, logical, bbio);
if (!zone) if (!zone)
break; break;
...@@ -407,11 +407,11 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root, ...@@ -407,11 +407,11 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root,
goto error; goto error;
} }
for (i = 0; i < nzones; ++i) { for (i = 0; i < nzones; ++i) {
dev = multi->stripes[i].dev; dev = bbio->stripes[i].dev;
ret = radix_tree_insert(&dev->reada_extents, index, re); ret = radix_tree_insert(&dev->reada_extents, index, re);
if (ret) { if (ret) {
while (--i >= 0) { while (--i >= 0) {
dev = multi->stripes[i].dev; dev = bbio->stripes[i].dev;
BUG_ON(dev == NULL); BUG_ON(dev == NULL);
radix_tree_delete(&dev->reada_extents, index); radix_tree_delete(&dev->reada_extents, index);
} }
...@@ -423,7 +423,7 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root, ...@@ -423,7 +423,7 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root,
} }
spin_unlock(&fs_info->reada_lock); spin_unlock(&fs_info->reada_lock);
kfree(multi); kfree(bbio);
return re; return re;
error: error:
...@@ -448,7 +448,7 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root, ...@@ -448,7 +448,7 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root,
kref_put(&zone->refcnt, reada_zone_release); kref_put(&zone->refcnt, reada_zone_release);
spin_unlock(&fs_info->reada_lock); spin_unlock(&fs_info->reada_lock);
} }
kfree(multi); kfree(bbio);
kfree(re); kfree(re);
if (looped) if (looped)
goto again; goto again;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment