diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2011-11-04 09:41:02 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-11-06 03:11:21 -0500 |
commit | 21ca543efc12674fddb22ddf4ea4906427f4e982 (patch) | |
tree | 61cebcafbc7605800b6411ea279f634db9c9da15 /fs/btrfs/reada.c | |
parent | 9510dc4c62252e96dca44a94948327c76774f25b (diff) |
Btrfs: rename btrfs_bio multi -> bbio for consistency
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/reada.c')
-rw-r--r-- | fs/btrfs/reada.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c index 35eaf6893679..2373b39a132b 100644 --- a/fs/btrfs/reada.c +++ b/fs/btrfs/reada.c | |||
@@ -247,7 +247,7 @@ int btree_readahead_hook(struct btrfs_root *root, struct extent_buffer *eb, | |||
247 | 247 | ||
248 | static struct reada_zone *reada_find_zone(struct btrfs_fs_info *fs_info, | 248 | static struct reada_zone *reada_find_zone(struct btrfs_fs_info *fs_info, |
249 | struct btrfs_device *dev, u64 logical, | 249 | struct btrfs_device *dev, u64 logical, |
250 | struct btrfs_bio *multi) | 250 | struct btrfs_bio *bbio) |
251 | { | 251 | { |
252 | int ret; | 252 | int ret; |
253 | int looped = 0; | 253 | int looped = 0; |
@@ -297,11 +297,11 @@ again: | |||
297 | kref_init(&zone->refcnt); | 297 | kref_init(&zone->refcnt); |
298 | zone->elems = 0; | 298 | zone->elems = 0; |
299 | zone->device = dev; /* our device always sits at index 0 */ | 299 | zone->device = dev; /* our device always sits at index 0 */ |
300 | for (i = 0; i < multi->num_stripes; ++i) { | 300 | for (i = 0; i < bbio->num_stripes; ++i) { |
301 | /* bounds have already been checked */ | 301 | /* bounds have already been checked */ |
302 | zone->devs[i] = multi->stripes[i].dev; | 302 | zone->devs[i] = bbio->stripes[i].dev; |
303 | } | 303 | } |
304 | zone->ndevs = multi->num_stripes; | 304 | zone->ndevs = bbio->num_stripes; |
305 | 305 | ||
306 | spin_lock(&fs_info->reada_lock); | 306 | spin_lock(&fs_info->reada_lock); |
307 | ret = radix_tree_insert(&dev->reada_zones, | 307 | ret = radix_tree_insert(&dev->reada_zones, |
@@ -327,7 +327,7 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root, | |||
327 | struct reada_extent *re = NULL; | 327 | struct reada_extent *re = NULL; |
328 | struct btrfs_fs_info *fs_info = root->fs_info; | 328 | struct btrfs_fs_info *fs_info = root->fs_info; |
329 | struct btrfs_mapping_tree *map_tree = &fs_info->mapping_tree; | 329 | struct btrfs_mapping_tree *map_tree = &fs_info->mapping_tree; |
330 | struct btrfs_bio *multi = NULL; | 330 | struct btrfs_bio *bbio = NULL; |
331 | struct btrfs_device *dev; | 331 | struct btrfs_device *dev; |
332 | u32 blocksize; | 332 | u32 blocksize; |
333 | u64 length; | 333 | u64 length; |
@@ -361,21 +361,21 @@ again: | |||
361 | * map block | 361 | * map block |
362 | */ | 362 | */ |
363 | length = blocksize; | 363 | length = blocksize; |
364 | ret = btrfs_map_block(map_tree, REQ_WRITE, logical, &length, &multi, 0); | 364 | ret = btrfs_map_block(map_tree, REQ_WRITE, logical, &length, &bbio, 0); |
365 | if (ret || !multi || length < blocksize) | 365 | if (ret || !bbio || length < blocksize) |
366 | goto error; | 366 | goto error; |
367 | 367 | ||
368 | if (multi->num_stripes > MAX_MIRRORS) { | 368 | if (bbio->num_stripes > MAX_MIRRORS) { |
369 | printk(KERN_ERR "btrfs readahead: more than %d copies not " | 369 | printk(KERN_ERR "btrfs readahead: more than %d copies not " |
370 | "supported", MAX_MIRRORS); | 370 | "supported", MAX_MIRRORS); |
371 | goto error; | 371 | goto error; |
372 | } | 372 | } |
373 | 373 | ||
374 | for (nzones = 0; nzones < multi->num_stripes; ++nzones) { | 374 | for (nzones = 0; nzones < bbio->num_stripes; ++nzones) { |
375 | struct reada_zone *zone; | 375 | struct reada_zone *zone; |
376 | 376 | ||
377 | dev = multi->stripes[nzones].dev; | 377 | dev = bbio->stripes[nzones].dev; |
378 | zone = reada_find_zone(fs_info, dev, logical, multi); | 378 | zone = reada_find_zone(fs_info, dev, logical, bbio); |
379 | if (!zone) | 379 | if (!zone) |
380 | break; | 380 | break; |
381 | 381 | ||
@@ -407,11 +407,11 @@ again: | |||
407 | goto error; | 407 | goto error; |
408 | } | 408 | } |
409 | for (i = 0; i < nzones; ++i) { | 409 | for (i = 0; i < nzones; ++i) { |
410 | dev = multi->stripes[i].dev; | 410 | dev = bbio->stripes[i].dev; |
411 | ret = radix_tree_insert(&dev->reada_extents, index, re); | 411 | ret = radix_tree_insert(&dev->reada_extents, index, re); |
412 | if (ret) { | 412 | if (ret) { |
413 | while (--i >= 0) { | 413 | while (--i >= 0) { |
414 | dev = multi->stripes[i].dev; | 414 | dev = bbio->stripes[i].dev; |
415 | BUG_ON(dev == NULL); | 415 | BUG_ON(dev == NULL); |
416 | radix_tree_delete(&dev->reada_extents, index); | 416 | radix_tree_delete(&dev->reada_extents, index); |
417 | } | 417 | } |
@@ -423,7 +423,7 @@ again: | |||
423 | } | 423 | } |
424 | spin_unlock(&fs_info->reada_lock); | 424 | spin_unlock(&fs_info->reada_lock); |
425 | 425 | ||
426 | kfree(multi); | 426 | kfree(bbio); |
427 | return re; | 427 | return re; |
428 | 428 | ||
429 | error: | 429 | error: |
@@ -448,7 +448,7 @@ error: | |||
448 | kref_put(&zone->refcnt, reada_zone_release); | 448 | kref_put(&zone->refcnt, reada_zone_release); |
449 | spin_unlock(&fs_info->reada_lock); | 449 | spin_unlock(&fs_info->reada_lock); |
450 | } | 450 | } |
451 | kfree(multi); | 451 | kfree(bbio); |
452 | kfree(re); | 452 | kfree(re); |
453 | if (looped) | 453 | if (looped) |
454 | goto again; | 454 | goto again; |