From: Greg KH on 10 May 2010 19:30 2.6.33-stable review patch. If anyone has any objections, please let us know. ------------------ From: Douglas Gilbert <dgilbert(a)interlog.com> commit 5447ed6c968e7270b656afa273c2b79d15d82edd upstream. In the scsi_debug driver, the virtual_gb option ignores the sector_size, implicitly assuming that is 512 bytes. So if 'virtual_gb=1 sector_size=4096' the result is an 8 GB (virtual) disk. Signed-off-by: Douglas Gilbert <dgilbert(a)interlog.com> Signed-off-by: James Bottomley <James.Bottomley(a)suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh(a)suse.de> --- drivers/scsi/scsi_debug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -956,7 +956,8 @@ static int resp_start_stop(struct scsi_c static sector_t get_sdebug_capacity(void) { if (scsi_debug_virtual_gb > 0) - return 2048 * 1024 * (sector_t)scsi_debug_virtual_gb; + return (sector_t)scsi_debug_virtual_gb * + (1073741824 / scsi_debug_sector_size); else return sdebug_store_sectors; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|
Pages: 1 Prev: [13/98] reiserfs: fix permissions on .reiserfs_priv Next: [15/98] nfsd4: bug in read_buf |