diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2009-06-22 05:12:15 -0400 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2009-06-22 05:12:15 -0400 |
commit | db8fef4fabe4a546ce74f80bff64fd43776e5912 (patch) | |
tree | 0e3cc2d7aa40783a1036cce6deb227a3a6d6c9e2 /drivers | |
parent | f6bd4eb73cdf2a5bf954e497972842f39cabb7e3 (diff) |
dm: rename suspended_bdev to bdev
Rename suspended_bdev to bdev.
This patch doesn't change any functionality, just renames the variable.
In the next patch, the variable will be used even for non-suspended device.
(Pre-requisite for the per-target barrier support patches.)
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/dm.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 59806e67a175..1cfd9b72403d 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -157,7 +157,7 @@ struct mapped_device { | |||
157 | * freeze/thaw support require holding onto a super block | 157 | * freeze/thaw support require holding onto a super block |
158 | */ | 158 | */ |
159 | struct super_block *frozen_sb; | 159 | struct super_block *frozen_sb; |
160 | struct block_device *suspended_bdev; | 160 | struct block_device *bdev; |
161 | 161 | ||
162 | /* forced geometry settings */ | 162 | /* forced geometry settings */ |
163 | struct hd_geometry geometry; | 163 | struct hd_geometry geometry; |
@@ -1214,9 +1214,9 @@ static void free_dev(struct mapped_device *md) | |||
1214 | { | 1214 | { |
1215 | int minor = MINOR(disk_devt(md->disk)); | 1215 | int minor = MINOR(disk_devt(md->disk)); |
1216 | 1216 | ||
1217 | if (md->suspended_bdev) { | 1217 | if (md->bdev) { |
1218 | unlock_fs(md); | 1218 | unlock_fs(md); |
1219 | bdput(md->suspended_bdev); | 1219 | bdput(md->bdev); |
1220 | } | 1220 | } |
1221 | destroy_workqueue(md->wq); | 1221 | destroy_workqueue(md->wq); |
1222 | mempool_destroy(md->tio_pool); | 1222 | mempool_destroy(md->tio_pool); |
@@ -1259,9 +1259,9 @@ static void __set_size(struct mapped_device *md, sector_t size) | |||
1259 | { | 1259 | { |
1260 | set_capacity(md->disk, size); | 1260 | set_capacity(md->disk, size); |
1261 | 1261 | ||
1262 | mutex_lock(&md->suspended_bdev->bd_inode->i_mutex); | 1262 | mutex_lock(&md->bdev->bd_inode->i_mutex); |
1263 | i_size_write(md->suspended_bdev->bd_inode, (loff_t)size << SECTOR_SHIFT); | 1263 | i_size_write(md->bdev->bd_inode, (loff_t)size << SECTOR_SHIFT); |
1264 | mutex_unlock(&md->suspended_bdev->bd_inode->i_mutex); | 1264 | mutex_unlock(&md->bdev->bd_inode->i_mutex); |
1265 | } | 1265 | } |
1266 | 1266 | ||
1267 | static int __bind(struct mapped_device *md, struct dm_table *t) | 1267 | static int __bind(struct mapped_device *md, struct dm_table *t) |
@@ -1277,7 +1277,7 @@ static int __bind(struct mapped_device *md, struct dm_table *t) | |||
1277 | if (size != get_capacity(md->disk)) | 1277 | if (size != get_capacity(md->disk)) |
1278 | memset(&md->geometry, 0, sizeof(md->geometry)); | 1278 | memset(&md->geometry, 0, sizeof(md->geometry)); |
1279 | 1279 | ||
1280 | if (md->suspended_bdev) | 1280 | if (md->bdev) |
1281 | __set_size(md, size); | 1281 | __set_size(md, size); |
1282 | 1282 | ||
1283 | if (!size) { | 1283 | if (!size) { |
@@ -1521,7 +1521,7 @@ int dm_swap_table(struct mapped_device *md, struct dm_table *table) | |||
1521 | goto out; | 1521 | goto out; |
1522 | 1522 | ||
1523 | /* without bdev, the device size cannot be changed */ | 1523 | /* without bdev, the device size cannot be changed */ |
1524 | if (!md->suspended_bdev) | 1524 | if (!md->bdev) |
1525 | if (get_capacity(md->disk) != dm_table_get_size(table)) | 1525 | if (get_capacity(md->disk) != dm_table_get_size(table)) |
1526 | goto out; | 1526 | goto out; |
1527 | 1527 | ||
@@ -1543,7 +1543,7 @@ static int lock_fs(struct mapped_device *md) | |||
1543 | 1543 | ||
1544 | WARN_ON(md->frozen_sb); | 1544 | WARN_ON(md->frozen_sb); |
1545 | 1545 | ||
1546 | md->frozen_sb = freeze_bdev(md->suspended_bdev); | 1546 | md->frozen_sb = freeze_bdev(md->bdev); |
1547 | if (IS_ERR(md->frozen_sb)) { | 1547 | if (IS_ERR(md->frozen_sb)) { |
1548 | r = PTR_ERR(md->frozen_sb); | 1548 | r = PTR_ERR(md->frozen_sb); |
1549 | md->frozen_sb = NULL; | 1549 | md->frozen_sb = NULL; |
@@ -1563,7 +1563,7 @@ static void unlock_fs(struct mapped_device *md) | |||
1563 | if (!test_bit(DMF_FROZEN, &md->flags)) | 1563 | if (!test_bit(DMF_FROZEN, &md->flags)) |
1564 | return; | 1564 | return; |
1565 | 1565 | ||
1566 | thaw_bdev(md->suspended_bdev, md->frozen_sb); | 1566 | thaw_bdev(md->bdev, md->frozen_sb); |
1567 | md->frozen_sb = NULL; | 1567 | md->frozen_sb = NULL; |
1568 | clear_bit(DMF_FROZEN, &md->flags); | 1568 | clear_bit(DMF_FROZEN, &md->flags); |
1569 | } | 1569 | } |
@@ -1603,8 +1603,8 @@ int dm_suspend(struct mapped_device *md, unsigned suspend_flags) | |||
1603 | 1603 | ||
1604 | /* bdget() can stall if the pending I/Os are not flushed */ | 1604 | /* bdget() can stall if the pending I/Os are not flushed */ |
1605 | if (!noflush) { | 1605 | if (!noflush) { |
1606 | md->suspended_bdev = bdget_disk(md->disk, 0); | 1606 | md->bdev = bdget_disk(md->disk, 0); |
1607 | if (!md->suspended_bdev) { | 1607 | if (!md->bdev) { |
1608 | DMWARN("bdget failed in dm_suspend"); | 1608 | DMWARN("bdget failed in dm_suspend"); |
1609 | r = -ENOMEM; | 1609 | r = -ENOMEM; |
1610 | goto out; | 1610 | goto out; |
@@ -1675,9 +1675,9 @@ int dm_suspend(struct mapped_device *md, unsigned suspend_flags) | |||
1675 | set_bit(DMF_SUSPENDED, &md->flags); | 1675 | set_bit(DMF_SUSPENDED, &md->flags); |
1676 | 1676 | ||
1677 | out: | 1677 | out: |
1678 | if (r && md->suspended_bdev) { | 1678 | if (r && md->bdev) { |
1679 | bdput(md->suspended_bdev); | 1679 | bdput(md->bdev); |
1680 | md->suspended_bdev = NULL; | 1680 | md->bdev = NULL; |
1681 | } | 1681 | } |
1682 | 1682 | ||
1683 | dm_table_put(map); | 1683 | dm_table_put(map); |
@@ -1708,9 +1708,9 @@ int dm_resume(struct mapped_device *md) | |||
1708 | 1708 | ||
1709 | unlock_fs(md); | 1709 | unlock_fs(md); |
1710 | 1710 | ||
1711 | if (md->suspended_bdev) { | 1711 | if (md->bdev) { |
1712 | bdput(md->suspended_bdev); | 1712 | bdput(md->bdev); |
1713 | md->suspended_bdev = NULL; | 1713 | md->bdev = NULL; |
1714 | } | 1714 | } |
1715 | 1715 | ||
1716 | clear_bit(DMF_SUSPENDED, &md->flags); | 1716 | clear_bit(DMF_SUSPENDED, &md->flags); |