diff options
author | Stefan Haberland <stefan.haberland@de.ibm.com> | 2014-07-18 14:19:25 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2014-07-22 09:26:21 +0200 |
commit | daa991bf30cbea85dc10560e6932406677ed5d5c (patch) | |
tree | 8ce6020df13e5d71803b7b9b0aa4d099717181fa /drivers/s390/block/dasd.c | |
parent | 896cb7e635ec562cd9f2dc98dea193727a50eade (diff) | |
download | op-kernel-dev-daa991bf30cbea85dc10560e6932406677ed5d5c.zip op-kernel-dev-daa991bf30cbea85dc10560e6932406677ed5d5c.tar.gz |
dasd: use aliases for formatted devices during format
Formatting of a previously formatted device is slower than newly
format a device when alias devices are available.
For already formatted devices the alias devices are not used for
formatting.
Fix the alias handling for already formatted devices.
Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block/dasd.c')
-rw-r--r-- | drivers/s390/block/dasd.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 1e50626..5e8442c 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c @@ -285,6 +285,12 @@ static int dasd_state_basic_to_known(struct dasd_device *device) { int rc; + if (device->discipline->basic_to_known) { + rc = device->discipline->basic_to_known(device); + if (rc) + return rc; + } + if (device->block) { dasd_profile_exit(&device->block->profile); debugfs_remove(device->block->debugfs_dentry); @@ -375,11 +381,6 @@ static int dasd_state_ready_to_basic(struct dasd_device *device) { int rc; - if (device->discipline->ready_to_basic) { - rc = device->discipline->ready_to_basic(device); - if (rc) - return rc; - } device->state = DASD_STATE_BASIC; if (device->block) { struct dasd_block *block = device->block; |