aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block/dasd_int.h
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_int.h
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_int.h')
-rw-r--r--drivers/s390/block/dasd_int.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/s390/block/dasd_int.h b/drivers/s390/block/dasd_int.h
index 0592354cc604..7cb0b9e78a6a 100644
--- a/drivers/s390/block/dasd_int.h
+++ b/drivers/s390/block/dasd_int.h
@@ -26,7 +26,7 @@
26 * new: the dasd_device structure is allocated. 26 * new: the dasd_device structure is allocated.
27 * known: the discipline for the device is identified. 27 * known: the discipline for the device is identified.
28 * basic: the device can do basic i/o. 28 * basic: the device can do basic i/o.
29 * accept: the device is analysed (format is known). 29 * unfmt: the device could not be analyzed (format is unknown).
30 * ready: partition detection is done and the device is can do block io. 30 * ready: partition detection is done and the device is can do block io.
31 * online: the device accepts requests from the block device queue. 31 * online: the device accepts requests from the block device queue.
32 * 32 *
@@ -47,8 +47,9 @@
47#define DASD_STATE_NEW 0 47#define DASD_STATE_NEW 0
48#define DASD_STATE_KNOWN 1 48#define DASD_STATE_KNOWN 1
49#define DASD_STATE_BASIC 2 49#define DASD_STATE_BASIC 2
50#define DASD_STATE_READY 3 50#define DASD_STATE_UNFMT 3
51#define DASD_STATE_ONLINE 4 51#define DASD_STATE_READY 4
52#define DASD_STATE_ONLINE 5
52 53
53#include <linux/module.h> 54#include <linux/module.h>
54#include <linux/wait.h> 55#include <linux/wait.h>