aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block/dasd_proc.c
diff options
context:
space:
mode:
authorHorst Hummel <horst.hummel@de.ibm.com>2006-03-08 00:55:39 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-08 17:14:01 -0500
commit90f0094dc607abe384a412bfb7199fb667ab0735 (patch)
tree2cd4c048a95d49a532bd237388f2b50ceb55ceb6 /drivers/s390/block/dasd_proc.c
parentfbcae7eafcf7dfb315602de935d7ca85574e5c11 (diff)
[PATCH] s390: dasd partition detection
DASD allows to open a device as soon as gendisk is registered, which means the device is a fake device (capacity=0) and we do know nothing about blocksize and partitions at that point of time. In case the device is opened by someone, the bdev and inode creation is done with the fake device info and the following partition detection code is just using the wrong data. To avoid this modify the DASD state machine to make sure that the open is rejected until the device analysis is either finished or an unformatted device was detected. Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@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/dasd_proc.c')
-rw-r--r--drivers/s390/block/dasd_proc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/s390/block/dasd_proc.c b/drivers/s390/block/dasd_proc.c
index 2d5da3c75ca7..4c1acc8daa82 100644
--- a/drivers/s390/block/dasd_proc.c
+++ b/drivers/s390/block/dasd_proc.c
@@ -93,6 +93,9 @@ dasd_devices_show(struct seq_file *m, void *v)
93 case DASD_STATE_BASIC: 93 case DASD_STATE_BASIC:
94 seq_printf(m, "basic"); 94 seq_printf(m, "basic");
95 break; 95 break;
96 case DASD_STATE_UNFMT:
97 seq_printf(m, "unnformatted");
98 break;
96 case DASD_STATE_READY: 99 case DASD_STATE_READY:
97 case DASD_STATE_ONLINE: 100 case DASD_STATE_ONLINE:
98 seq_printf(m, "active "); 101 seq_printf(m, "active ");