From: James Bottomley <James.Bottomley@SteelEye.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Kay Sievers <kay.sievers@vrfy.org>, Greg KH <greg@kroah.com>,
Hannes Reinecke <hare@suse.de>,
SCSI development list <linux-scsi@vger.kernel.org>
Subject: Re: BUG in: Driver core: convert block from raw kobjects to core devices (fwd)
Date: Wed, 31 Oct 2007 12:07:49 -0500 [thread overview]
Message-ID: <1193850469.3411.66.camel@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0710311238090.6022-100000@iolanthe.rowland.org>
On Wed, 2007-10-31 at 12:44 -0400, Alan Stern wrote:
> On Wed, 31 Oct 2007, James Bottomley wrote:
>
> > OK, light beginning to go on now.
> >
> > The problem is that you've fallen into the conceptual trap we tried very
> > hard to avoid in the initial go around of joining SCSI upper layer
> > drivers to gendisks. That's why no gendisk references are held by the
> > mid-layer, only by the entities that represent the objects created by
> > upper layer drivers.
> >
> > Doesn't this circularity now exist for everything? Every device that
> > creates a queue has a reference to the queue, every queue has a
> > reference to its attached gendisk and now every gendisk has a reference
> > to the device creating the queue? This doesn't look to be a SCSI
> > specific problem.
>
> It probably isn't. I haven't looked at other subsystems but the
> scenario you described could well be the common case.
>
> Dropping a kobject's reference to its parent when the kobject is
> removed rather than when it is deleted will solve all these problems.
> The queue's reference to the gendisk and the gendisk's reference to the
> device will both be dropped when the device is unregistered, allowing
> the device and gendisk to be released. When the device is released it
> can then drop its reference to the queue, allowing the queue to be
> released.
>
> In other words, reverting that 4-year-old patch would fix everything.
> I'd still like to get your acknowledgement for my patch, posted here:
>
> http://marc.info/?l=linux-scsi&m=119368368904151&w=2
It sounds plausible, but I'm not really up to speed on all the changes
going on in sysfs at the moment, so it would be dangerous to rely on
what I think sounds reasonable.
James
next prev parent reply other threads:[~2007-10-31 17:12 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-29 15:18 BUG in: Driver core: convert block from raw kobjects to core devices (fwd) Alan Stern
2007-10-29 15:35 ` James Bottomley
2007-10-29 16:38 ` Alan Stern
2007-10-29 16:45 ` James Bottomley
2007-10-29 17:04 ` Alan Stern
2007-10-29 18:47 ` Alan Stern
2007-10-29 19:13 ` Kay Sievers
2007-10-31 4:25 ` Greg KH
2007-10-31 10:46 ` Kay Sievers
2007-10-31 14:32 ` Greg KH
2007-10-31 15:15 ` James Bottomley
2007-10-31 15:40 ` Kay Sievers
2007-10-31 15:47 ` James Bottomley
2007-10-31 16:04 ` Alan Stern
2007-10-31 16:13 ` James Bottomley
2007-10-31 16:24 ` Kay Sievers
2007-10-31 16:31 ` James Bottomley
2007-10-31 16:42 ` Kay Sievers
2007-10-31 16:46 ` James Bottomley
2007-10-31 17:32 ` Kay Sievers
2007-10-31 18:36 ` Alan Stern
2007-10-31 16:44 ` Alan Stern
2007-10-31 17:07 ` James Bottomley [this message]
2007-10-31 18:38 ` Alan Stern
2007-10-31 15:58 ` Alan Stern
2007-10-31 16:11 ` James Bottomley
2007-10-31 4:24 ` Greg KH
2007-10-31 15:51 ` Alan Stern
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=1193850469.3411.66.camel@localhost.localdomain \
--to=james.bottomley@steeleye.com \
--cc=greg@kroah.com \
--cc=hare@suse.de \
--cc=kay.sievers@vrfy.org \
--cc=linux-scsi@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/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