From: Douglas Gilbert <dgilbert@interlog.com>
To: Jeff Mahoney <jeffm@suse.com>
Cc: Linux SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] scsi_debug: scale virtual_gb with sector_size properly
Date: Thu, 17 Dec 2009 14:57:06 -0500 [thread overview]
Message-ID: <4B2A8D12.2000304@interlog.com> (raw)
In-Reply-To: <4B2830CF.2020203@suse.com>
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@suse.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
prev parent reply other threads:[~2009-12-17 19:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-16 0:58 [PATCH] scsi_debug: scale virtual_gb with sector_size properly Jeff Mahoney
2009-12-17 19:57 ` Douglas Gilbert [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B2A8D12.2000304@interlog.com \
--to=dgilbert@interlog.com \
--cc=jeffm@suse.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox