From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Tejun Heo <tj@kernel.org>
Cc: jeff@garzik.org, linux-ide@vger.kernel.org,
jens.axboe@oracle.com, linux-kernel@vger.kernel.org,
linux-scsi@vger.kernel.org, Mauelshagen@RedHat.com,
dm-devel@RedHat.com, dan.j.williams@gmail.com
Subject: Re: [PATCH 2/3] scsi: add scsi_device->alt_capacity
Date: Fri, 08 May 2009 23:23:19 -0500 [thread overview]
Message-ID: <1241842999.6357.2.camel@mulgrave> (raw)
In-Reply-To: <1241828002-12742-3-git-send-email-tj@kernel.org>
On Sat, 2009-05-09 at 09:13 +0900, Tejun Heo wrote:
> Add scsi_device->alt_capacity and let sd pass it over to genhd. This
> is to allow SCSI low level drivers to configure alt_capacity via
> slave_configure().
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Cc: Jens Axboe <jens.axboe@oracle.com>
> Cc: Dan Williams <dan.j.williams@gmail.com>
> Cc: Jeff Garzik <jeff@garzik.org>
> Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
> ---
> drivers/scsi/sd.c | 1 +
> include/scsi/scsi_device.h | 1 +
> 2 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
> index 3fcb64b..f3448bf 100644
> --- a/drivers/scsi/sd.c
> +++ b/drivers/scsi/sd.c
> @@ -1839,6 +1839,7 @@ static int sd_revalidate_disk(struct gendisk *disk)
> blk_queue_ordered(sdkp->disk->queue, ordered, sd_prepare_flush);
>
> set_capacity(disk, sdkp->capacity);
> + set_alt_capacity(disk, sdp->alt_capacity);
> kfree(buffer);
>
> out:
> diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
> index 3f566af..b24fdeb 100644
> --- a/include/scsi/scsi_device.h
> +++ b/include/scsi/scsi_device.h
> @@ -92,6 +92,7 @@ struct scsi_device {
> unsigned int manufacturer; /* Manufacturer of device, for using
> * vendor-specific cmd's */
> unsigned sector_size; /* size in bytes */
> + size_t alt_capacity; /* alternative capacity, used by sd */
>
> void *hostdata; /* available to low-level driver */
> char type;
This is done at slightly the wrong level. Capacity is actually a
property of struct scsi_disk not struct scsi_device ... shouldn't
alt_capacity be at the same level?
James
next prev parent reply other threads:[~2009-05-09 4:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-09 0:13 [GIT PATCH] block,scsi,libata: implement alt_size, take#2 Tejun Heo
2009-05-09 0:13 ` [PATCH 1/3] block: add alt_size Tejun Heo
2009-05-09 13:45 ` Kay Sievers
2009-05-09 14:04 ` Tejun Heo
2009-05-09 16:26 ` Kay Sievers
2009-05-11 13:45 ` [dm-devel] " Konrad Rzeszutek
2009-05-12 0:53 ` Tejun Heo
2009-05-09 0:13 ` [PATCH 2/3] scsi: add scsi_device->alt_capacity Tejun Heo
2009-05-09 4:23 ` James Bottomley [this message]
2009-05-09 16:09 ` Tejun Heo
2009-05-09 16:23 ` James Bottomley
2009-05-10 1:26 ` Tejun Heo
2009-05-15 19:44 ` ATA ULD (was Re: [PATCH 2/3] scsi: add scsi_device->alt_capacity) Jeff Garzik
2009-05-09 0:13 ` [PATCH 3/3] libata: export HPA size as alt_size Tejun Heo
-- strict thread matches above, loose matches on Subject: below --
2009-02-01 2:55 [PATCHSET] block,scsi,libata: implement alt_size Tejun Heo
2009-02-01 2:55 ` [PATCH 2/3] scsi: add scsi_device->alt_capacity Tejun Heo
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=1241842999.6357.2.camel@mulgrave \
--to=james.bottomley@hansenpartnership.com \
--cc=Mauelshagen@RedHat.com \
--cc=dan.j.williams@gmail.com \
--cc=dm-devel@RedHat.com \
--cc=jeff@garzik.org \
--cc=jens.axboe@oracle.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=tj@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;
as well as URLs for NNTP newsgroup(s).