[dm-devel] Re: [PATCH 1/3] sysfs representation of stacked devices (common) (rev.2)

Jun'ichi Nomura j-nomura at ce.jp.nec.com
Thu Feb 23 19:15:45 UTC 2006


Hello Greg,

>>>>+/* This is a mere directory in sysfs. No methods are needed. */
>>>>+static struct kobj_type bd_holder_ktype = {
>>>>+	.release	= NULL,
>>>>+	.sysfs_ops	= NULL,
>>>>+	.default_attrs	= NULL,
>>>>+};
>>>
>>>That doesn't look right.  You always need a release function.

I updated the patch based your comments.
Could you take a look at this version whether there's
any problematic use of sysfs/kobjects?

   - I removed embedded child-kobjects from struct block_device
     and struct gendisk which I added in my previous patch.
     Kobject registration occurs when gendisk or hd_struct is
     registered. Release function of the kobject type is added.
   - Reference counting of kobjects is done in much symmetric
     manner than before.
   - Added bd_claim_by_disk/bd_release_from_disk inline functions
     to help proper reference counting.

Thanks,
-- 
Jun'ichi Nomura, NEC Solutions (America), Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: common-2.6.16-rc4.patch
Type: text/x-patch
Size: 11093 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20060223/7a97bf7d/attachment.bin>


More information about the dm-devel mailing list