Re: [PATCH] scsi_debug: scale virtual_gb with sector_size properly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff Mahoney wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

 The scsi_debug virtual_gb feature currently assumes that the sector size
 is always 512 bytes and scales the capacity of virtual_gb based on that
 assumption.

 When passed a different sector size, the capacity of the disk is scaled
 incorrectly higher than it should be.

 For example, modprobe scsi_debug virtual_gb=1 sector_size=4096 results
 in an 8 GB device.

 This patch scales it appropriately. I chose to scale down the sectors-per-GB
 value and then multiply so that if virtual_gb is changed to allow devices that
 can max out sector_t, it will just work.

 References: https://bugzilla.novell.com/show_bug.cgi?id=535939

Signed-off-by: Jeff Mahoney <jeffm@xxxxxxxx>

Acked-by: Douglas Gilbert <dgilbert@xxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux