diff options
author | Horst Hummel <horst.hummel@de.ibm.com> | 2006-04-10 22:53:47 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-11 06:18:38 -0700 |
commit | dafd87aaef7d95a6ad3ff92e0d512e5b166c0716 (patch) | |
tree | e60cb58ab85a874c07e9a1d93ffc8b5c94858aa1 /drivers/s390/block | |
parent | 06fbcb104ad16c22eb5718ae598b306c777be8af (diff) | |
download | talos-obmc-linux-dafd87aaef7d95a6ad3ff92e0d512e5b166c0716.tar.gz talos-obmc-linux-dafd87aaef7d95a6ad3ff92e0d512e5b166c0716.zip |
[PATCH] s390: dasd device offline messages
The dasd driver sometimes print the misleading message "Can't offline dasd
device with open count = 0". The reason why it can't offline the device in
this case is that the device is still in the startup phase. Print a more
meaningful message.
Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/s390/block')
-rw-r--r-- | drivers/s390/block/dasd.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 0a9f12c4e911..170aae004ceb 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c @@ -1968,7 +1968,7 @@ int dasd_generic_set_offline (struct ccw_device *cdev) { struct dasd_device *device; - int max_count; + int max_count, open_count; device = dasd_device_from_cdev(cdev); if (IS_ERR(device)) @@ -1985,10 +1985,16 @@ dasd_generic_set_offline (struct ccw_device *cdev) * in the other openers. */ max_count = device->bdev ? 0 : -1; - if (atomic_read(&device->open_count) > max_count) { - printk (KERN_WARNING "Can't offline dasd device with open" - " count = %i.\n", - atomic_read(&device->open_count)); + open_count = (int) atomic_read(&device->open_count); + if (open_count > max_count) { + if (open_count > 0) + printk (KERN_WARNING "Can't offline dasd device with " + "open count = %i.\n", + open_count); + else + printk (KERN_WARNING "%s", + "Can't offline dasd device due to internal " + "use\n"); clear_bit(DASD_FLAG_OFFLINE, &device->flags); dasd_put_device(device); return -EBUSY; |