From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Richard Sharpe <realrichardsharpe@gmail.com>
Cc: "Nicholas A. Bellinger" <nab@linux-iscsi.org>,
Greg KH <gregkh@suse.de>, linux-scsi <linux-scsi@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
Mike Christie <michaelc@cs.wisc.edu>,
Christoph Hellwig <hch@lst.de>, Hannes Reinecke <hare@suse.de>,
James Bottomley <James.Bottomley@suse.de>,
Jens Axboe <axboe@kernel.dk>, Boaz Harrosh <bharrosh@panasas.com>
Subject: Re: [RFC 22/22] tcm_loop: Add multi-fabric Linux/SCSI LLD fabric module
Date: Mon, 6 Sep 2010 12:44:46 -0700 [thread overview]
Message-ID: <20100906194446.GA31384@core.coreip.homeip.net> (raw)
In-Reply-To: <AANLkTimhHt78GFbxxjy1tosmebMVg-vKCNoJuqVa+iLH@mail.gmail.com>
On Mon, Sep 06, 2010 at 07:48:20AM -0700, Richard Sharpe wrote:
> On Sun, Sep 5, 2010 at 11:26 PM, Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
> >
> > I think what you need is root_device_create() which will allocate a
> > device structure and assign ->release() that is implemented outside of
> > your module. This way your module may be unloaded even if there are
> > outstanding references to tcm_loop_primary device.
>
> I am embarrassed to admit that scst_local (or whatever its new name
> will be) probably has the same fault, as it too was based on
> scsi_debug ...
>
> However, I did a search of the 2.6.24.1 source tree and could not find
> any instances of root_device_create() being called nor defined. I just
> double and triple checked the spelling.
>
> Ahhh, I see why. A slightly different search suggests that it is
> root_device_register(const char *name).
>
> From include/linux/device.h:
>
> static inline struct device *root_device_register(const char *name)
> {
> return __root_device_register(name, THIS_MODULE);
> }
>
> Was that the one you were thinking of?
>
Yes, that is the one. I'll blame Greg for inconsistent naming that
caused this error :) - we usually have xxx_register() for objects that
we already have on hand and xxx_create() (as in device_create) when we
want the object to be allocated for us.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2010-09-06 19:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-30 9:23 [RFC 22/22] tcm_loop: Add multi-fabric Linux/SCSI LLD fabric module Nicholas A. Bellinger
2010-09-05 20:30 ` Dmitry Torokhov
2010-09-05 21:51 ` Nicholas A. Bellinger
2010-09-06 5:08 ` Dmitry Torokhov
2010-09-06 5:17 ` Greg KH
2010-09-06 5:21 ` Nicholas A. Bellinger
2010-09-06 5:38 ` Dmitry Torokhov
2010-09-06 6:01 ` Nicholas A. Bellinger
2010-09-06 6:26 ` Dmitry Torokhov
2010-09-06 14:48 ` Richard Sharpe
2010-09-06 15:06 ` Richard Sharpe
2010-09-06 19:44 ` Dmitry Torokhov [this message]
2010-09-06 20:34 ` Greg KH
2010-09-06 7:01 ` Dmitry Torokhov
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=20100906194446.GA31384@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=James.Bottomley@suse.de \
--cc=axboe@kernel.dk \
--cc=bharrosh@panasas.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=gregkh@suse.de \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
--cc=nab@linux-iscsi.org \
--cc=realrichardsharpe@gmail.com \
/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).