diff options
author | Hannes Reinecke <hare@suse.de> | 2006-09-01 09:50:23 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-09-02 14:37:47 -0400 |
commit | 69bdd88ca2670c321fef774e77059516f836c6f2 (patch) | |
tree | 4df0e1cc0bc90306762db2b0591dc7a067952365 | |
parent | 01dfc7fc56f4b7ec0e5344ab44fcf673ebfbf7fa (diff) |
[SCSI] Wrong size information for devices with disabled read access
When accessing a device with disabled read access the capacity is set
randomly to 1GB. This makes it impossible to userspace tools to detect
invalid device capacities.
Signed-off-by: Mike Anderson <andmike@us.ibm.com>
Acked-by: Chris Mason <mason@suse.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
-rw-r--r-- | drivers/scsi/sd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 98bd3aab9739..638cff41d436 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -1215,7 +1215,7 @@ repeat: | |||
1215 | /* Either no media are present but the drive didn't tell us, | 1215 | /* Either no media are present but the drive didn't tell us, |
1216 | or they are present but the read capacity command fails */ | 1216 | or they are present but the read capacity command fails */ |
1217 | /* sdkp->media_present = 0; -- not always correct */ | 1217 | /* sdkp->media_present = 0; -- not always correct */ |
1218 | sdkp->capacity = 0x200000; /* 1 GB - random */ | 1218 | sdkp->capacity = 0; /* unknown mapped to zero - as usual */ |
1219 | 1219 | ||
1220 | return; | 1220 | return; |
1221 | } else if (the_result && longrc) { | 1221 | } else if (the_result && longrc) { |