From mboxrd@z Thu Jan 1 00:00:00 1970 From: ebiederm@xmission.com (Eric W. Biederman) Subject: Re: [PATCH 12/15] driver core: Implement tagged directory support for device classes. Date: Tue, 15 Jul 2008 23:32:24 -0700 Message-ID: References: <486DD650.3000804@gmail.com> <486E2C3B.6020603@gmail.com> <20080704161200.GA1440@suse.de> <487D6A24.9070001@gmail.com> <487D8C0A.9060100@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: In-Reply-To: <487D8C0A.9060100@gmail.com> (Tejun Heo's message of "Wed, 16 Jul 2008 14:50:02 +0900") Sender: netdev-owner@vger.kernel.org To: Tejun Heo Cc: Greg KH , Andrew Morton , Daniel Lezcano , linux-kernel@vger.kernel.org, Al Viro , Linux Containers , Benjamin Thery , netdev@vger.kernel.org List-Id: containers.vger.kernel.org Tejun Heo writes: > It's a bit scary tho. Working inode->i_dentry or dentry->d_alias > crosses multiple sb's. sysfs isn't too greedy about dcache/icache. > Only open files and directories hold them and only single copy of > sysfs_dirent is there for most nodes. Wouldn't it be better to stay on > the safer side and use separate inode hierarchy? To do that I believe we would need to ensure sysfs does not use the inode->i_mutex lock except to keep the VFS layer out. Allowing us to safely change the directory structure, without holding it. You raise a good point about inode->i_dentry and dentry->d_alias. Generally they are used by fat like filesystems but I am starting to see uses in generic pieces of code. I don't see any problems today but yes it would be good to do the refactoring to allow us to duplicate the inodes. Eric