From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Subject: Re: [PATCH 1/3] DEBUGFS: Automatically create parents for debugfs files Date: Fri, 2 Dec 2011 11:17:24 -0800 Message-ID: <20111202191724.GA13613@kroah.com> References: <1322851407-17182-1-git-send-email-andi@firstfloor.org> <1322851407-17182-2-git-send-email-andi@firstfloor.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, fengguang.wu@intel.com, Andi Kleen To: Andi Kleen Return-path: Content-Disposition: inline In-Reply-To: <1322851407-17182-2-git-send-email-andi@firstfloor.org> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Fri, Dec 02, 2011 at 10:43:25AM -0800, Andi Kleen wrote: > From: Andi Kleen > > Allow passing path names to debugfs_create* and automatically create > the parents. This makes it much simpler for the caller to create hierarchies. > > The way the reference counts are handled is admittedly a bit ugly. > > There is no way to clean them up currently other than to delete the tree, > but that doesn't seem like a big problem for debugfs to leave > behind a few empty directories. I like this, but some documentation will probably need to be added somwhere saying that it's now legal to create a debugfs file with "this/is/a/tree" and have it all be expanded out. And yes, cleaning up the directories shouldn't be a big issue, but what if the directory is already there and it tries to be created again? Shouldn't you do a lookup first and use that dentry if it's there? thanks, greg k-h