public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: linux-scsi@vger.kernel.org, Patrick Mochel <mochel@osdl.org>
Subject: Re: [RFC] scsi host sysfs support again [0/4]
Date: Mon, 5 May 2003 11:17:35 +0100	[thread overview]
Message-ID: <20030505111735.A16914@infradead.org> (raw)
In-Reply-To: <20030505094818.GH8416@beaverton.ibm.com>; from andmike@us.ibm.com on Mon, May 05, 2003 at 02:48:18AM -0700

On Mon, May 05, 2003 at 02:48:18AM -0700, Mike Anderson wrote:
> While scsi_remove_host cannot imply a scsi_set_host_offline unless we
> change the previous definition. We indicated that scsi_set_host_offline
> may cancel commands in flight which implys some sync point.

Yes.

> Ok I will look at the change you suggest in the morning after I have
> some sleep. I guess the first step would be moving the kfree(shost) out
> of scsi_unregister. This would then stay around until ref counts go to
> zero.

Actually what I think must happen is that scsi_unregister will do
nothing unless the refcount reaches zero.  It should also be renamed
to scsi_put_host to make this more explicit.

Then we'd have:

	scsi_alloc_host
		- allocate storage for struct Scsi_Host, some
		  basic initalization.  refcount set to 1;
	scsi_get_host
		- get a reference to an existing struct Scsi_Host
	scsi_put_host
		- decrement usecount of an existing struct Scsi_Host,
		  free it if this was the last reference
	scsi_add_host
		- register host with the scsi midlayer
	scsi_remove_host
		- unregister host with the scsi midlayer, force all
		  I/O to fail from now on and never call back into
		  the driver.

To avoid touching all old-style drivers we should probably keep
the scsi_register/scsi_unregister aliases for 2.6.


  reply	other threads:[~2003-05-05 10:05 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-05  8:33 [RFC] scsi host sysfs support again [0/4] Mike Anderson
2003-05-05  8:34 ` [RFC] scsi host sysfs support again [1/4] Mike Anderson
2003-05-05  8:35   ` [RFC] scsi host sysfs support again [2/4] Mike Anderson
2003-05-05  8:37     ` [RFC] scsi host sysfs support again [3/4] Mike Anderson
2003-05-05  8:38       ` [RFC] scsi host sysfs support again [4/4] Mike Anderson
2003-05-05  8:38 ` [RFC] scsi host sysfs support again [0/4] Christoph Hellwig
2003-05-05  9:40   ` Douglas Gilbert
2003-05-05 10:00     ` Mike Anderson
2003-05-05  9:48   ` Mike Anderson
2003-05-05 10:17     ` Christoph Hellwig [this message]
2003-05-06  1:05       ` Mike Anderson
2003-05-07 15:44         ` Christoph Hellwig
2003-05-07 16:15           ` Mike Anderson
2003-05-07 16:41             ` Christoph Hellwig
2003-05-05 11:46 ` Douglas Gilbert
2003-05-05 21:45   ` Mike Anderson
2003-05-06  1:12     ` Douglas Gilbert
2003-05-06 16:28 ` James Bottomley
2003-05-06 17:23   ` Mike Anderson
2003-05-07 23:19     ` Willem Riede
2003-05-08  0:09       ` Douglas Gilbert
2003-05-08  1:44       ` Mike Anderson

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=20030505111735.A16914@infradead.org \
    --to=hch@infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mochel@osdl.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