aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDaniel Stodden <daniel.stodden@citrix.com>2010-08-07 12:51:21 -0400
committerJens Axboe <jaxboe@fusionio.com>2010-08-07 12:51:21 -0400
commitd54142c71f05b608b7360d80bdab74eed0f17a98 (patch)
tree05bae4d49f360b4b18b8a69014f1489fae8a9fe5 /drivers
parent7b32d1044ae791a1e53a53023bf2668438d5301b (diff)
blkfront: Klog the unclean release path
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/xen-blkfront.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index b01167b6207a..c6727b5cefd6 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -1120,6 +1120,10 @@ static int blkfront_remove(struct xenbus_device *xbdev)
1120 mutex_lock(&bdev->bd_mutex); 1120 mutex_lock(&bdev->bd_mutex);
1121 info = disk->private_data; 1121 info = disk->private_data;
1122 1122
1123 dev_warn(disk_to_dev(disk),
1124 "%s was hot-unplugged, %d stale handles\n",
1125 xbdev->nodename, bdev->bd_openers);
1126
1123 if (info && !bdev->bd_openers) { 1127 if (info && !bdev->bd_openers) {
1124 xlvbd_release_gendisk(info); 1128 xlvbd_release_gendisk(info);
1125 disk->private_data = NULL; 1129 disk->private_data = NULL;
@@ -1191,6 +1195,7 @@ static int blkif_release(struct gendisk *disk, fmode_t mode)
1191 1195
1192 if (xbdev && xbdev->state == XenbusStateClosing) { 1196 if (xbdev && xbdev->state == XenbusStateClosing) {
1193 /* pending switch to state closed */ 1197 /* pending switch to state closed */
1198 dev_info(disk_to_dev(bdev->bd_disk), "releasing disk\n");
1194 xlvbd_release_gendisk(info); 1199 xlvbd_release_gendisk(info);
1195 xenbus_frontend_closed(info->xbdev); 1200 xenbus_frontend_closed(info->xbdev);
1196 } 1201 }
@@ -1199,6 +1204,7 @@ static int blkif_release(struct gendisk *disk, fmode_t mode)
1199 1204
1200 if (!xbdev) { 1205 if (!xbdev) {
1201 /* sudden device removal */ 1206 /* sudden device removal */
1207 dev_info(disk_to_dev(bdev->bd_disk), "releasing disk\n");
1202 xlvbd_release_gendisk(info); 1208 xlvbd_release_gendisk(info);
1203 disk->private_data = NULL; 1209 disk->private_data = NULL;
1204 kfree(info); 1210 kfree(info);