Re: [RFC 22/22] tcm_loop: Add multi-fabric Linux/SCSI LLD fabric module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux