Commit 86d429db authored by Tony Battersby's avatar Tony Battersby Committed by James Bottomley

[PATCH] fix read capacity for large disks when CONFIG_LBD=n

We shouldn't configure an device that requires LBD if the kernel
doesn't suppoprt it (because we won't be able to see most of it), so
set the capacity to zero in this case.
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent f6c9047b
......@@ -1082,9 +1082,12 @@ sd_read_capacity(struct scsi_disk *sdkp, char *diskname,
" READ CAPACITY(16).\n", diskname);
longrc = 1;
goto repeat;
} else {
printk(KERN_ERR "%s: too big for kernel. Assuming maximum 2Tb\n", diskname);
}
printk(KERN_ERR "%s: too big for this kernel. Use a "
"kernel compiled with support for large block "
"devices.\n", diskname);
sdkp->capacity = 0;
goto got_data;
}
sdkp->capacity = 1 + (((sector_t)buffer[0] << 24) |
(buffer[1] << 16) |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment