All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Tejun Heo <tj@kernel.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: ATA ULD (was Re: [PATCH 2/3] scsi: add scsi_device->alt_capacity)
Date: Fri, 15 May 2009 15:44:57 -0400	[thread overview]
Message-ID: <4A0DC639.8060104@garzik.org> (raw)
In-Reply-To: <1241886223.3542.37.camel@mulgrave.int.hansenpartnership.com>

James Bottomley wrote:
> On Sun, 2009-05-10 at 01:09 +0900, Tejun Heo wrote:
>> James Bottomley wrote:
>>> 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?
>> Hmmm... I think that was my first try and then I moved it to sdev for
>> some reason I can't rememer now.  I'll look into it again and try to
>> move it into sdev.
> 
> Really one of the things I was wondering is why even scsi_disk ...
> capacity is in there, but it's also in gendisk, so I've thought
> (admittedly never translated it to action) that we could just remove the
> duplication in scsi_disk.
> 
> This alt_capacity looks to be a pure ATA thing ... I can't find it in
> the SCSI specs and there doesn't seem to be a SAT equivalent of the
> commands.  Ideally, what should be happening is that the ata ULD would
> issue the capacity commands and just set the block alt_capacity without
> having to worry about transporting the value up and down the stack.
> Matthew Wilcox thought we could begin an implementation of the ATA uld
> using the ATA_16 command to transport it through SCSI ... this might
> provide the good reason to begin that.

hmmmmm.  Well, ATA ULD is certainly the long term goal.  My main worry 
would then be user impact & confusion, and increasing the difficulty of 
separating libata from SCSI by increasing difficulty of making SCSI 
emulation an optional piece.

At this point the SCSI emulation is not only a hack to get sd.c to do 
work for us, it is also part of the ABI expected of diagnostic tools and 
the like.  That complicates changes.

It is my hope that we can separate libata-scsi.c into a separate kernel 
module, thus at least making it _optional_, thus providing a path for 
CONFIG_ATA + !CONFIG_SCSI.

I do also agree that the ATA hacks can only go on for so long, before 
they start infecting SCSI.   e.g. there was a patch to add DMI check in 
sd.c for an ATA hardware special case.

So far the "ATA infection" has been thankfully limited to things that sd 
might need anyway, like suspend/resume (start/stop)

A "libsd" does not seem viable, though.  Might be better to
	cp sd.c ata-disk.c
and then iterate from there, over time.

	Jeff





  parent reply	other threads:[~2009-05-15 19:44 UTC|newest]

Thread overview: 22+ 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 ` Tejun Heo
2009-05-09  0:13 ` [PATCH 1/3] block: add alt_size Tejun Heo
2009-05-09  0:13   ` Tejun Heo
2009-05-09 13:45   ` Kay Sievers
2009-05-09 13:45     ` Kay Sievers
2009-05-09 14:04     ` Tejun Heo
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-12  0:53           ` [dm-devel] " Tejun Heo
2009-05-09  0:13 ` [PATCH 2/3] scsi: add scsi_device->alt_capacity Tejun Heo
2009-05-09  0:13   ` Tejun Heo
2009-05-09  4:23   ` James Bottomley
2009-05-09 16:09     ` Tejun Heo
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         ` Jeff Garzik [this message]
2009-05-09  0:13 ` [PATCH 3/3] libata: export HPA size as alt_size Tejun Heo
2009-05-09  0:13   ` 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=4A0DC639.8060104@garzik.org \
    --to=jeff@garzik.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=Mauelshagen@RedHat.com \
    --cc=dan.j.williams@gmail.com \
    --cc=dm-devel@RedHat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.