All of lore.kernel.org
 help / color / mirror / Atom feed
From: Edward Falk <efalk@google.com>
To: linux-scsi@vger.kernel.org
Subject: Re: map gendisk (or blockdev) -> scsi_device
Date: Wed, 13 Jul 2005 11:44:34 -0700	[thread overview]
Message-ID: <db3nei$nrs$1@sea.gmane.org> (raw)
In-Reply-To: <20050713143843.GC26025@infradead.org>


> You should revisit your code to not need access to the scsi_device
> structure, and follow the layering of the block and scsi subsystems.

Maybe I should explain what I'm trying to do here.

Some of our software reads some of the values in /proc/ide/hda/.  We're 
porting this facility to libata-based drivers in 2.6 and moving it to 
/sysfs/block/sda/.  The sysfs show() functions will be given pointers to 
gendisk structures but will need to obtain information from the 
associated scsi_device structure.

Does anybody have any suggestions as to the "right" way to proceed?


meta:

I understand the layering of block vs scsi and so on, but I wonder why 
there's so much isolation in the kernel.  Why should it be impossible to 
obtain the gendisk structure from the scsi_device structure, or to 
obtain the block_device structure from the gendisk?

   -ed falk


  reply	other threads:[~2005-07-13 18:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-13  0:38 map gendisk (or blockdev) -> scsi_device Edward Falk
2005-07-13  1:31 ` Chen, Kenneth W
2005-07-13 14:38 ` Christoph Hellwig
2005-07-13 18:44   ` Edward Falk [this message]
2005-07-13 23:46     ` Patrick Mansfield
2005-07-14 18:38       ` Edward Falk
2005-07-14 19:56       ` Christoph Hellwig
2005-07-14 22:54         ` Edward Falk

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='db3nei$nrs$1@sea.gmane.org' \
    --to=efalk@google.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 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.