From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [patch 03/15] cgroup: dont call vfs_mkdir Date: Mon, 5 May 2008 09:08:04 -0400 Message-ID: <20080505130804.GA1809@infradead.org> References: <20080505095440.820370974@szeredi.hu> <20080505095511.217634550@szeredi.hu> <20080505110016.GC20910@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: hch@infradead.org, akpm@linux-foundation.org, viro@ZenIV.linux.org.uk, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, menage@google.com To: Miklos Szeredi Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Mon, May 05, 2008 at 02:32:22PM +0200, Miklos Szeredi wrote: > > Looks correct but I don't think it's a good idea. Spreading more logic > > into filesystems without a good reason is rarely a good idea. > > (Thanks for the review, Christoph) > > Agreed completely, but vfs_* aren't for filesystems to call, rather > for entities calling _into_ filesystems from the outside. This is > actually a very rare thing, so adding some extra logic for the sake of > cleanliness should be OK. > > Now it can be argued, that cgroup_clone() is calling into the > filesystem from the outside. But it's not really doing that, rather > it's making an internal modification to a specific filesystem, > triggered by some external action. I don't think that matters. We're not about overly strict layering, and especialy this kind where you call into a higher layer to get back into the lower one is not harmful at all. For cgroup it's only a small duplication, but e.g. I don't really like all the duplications in the reiserfs case. Unless we have a very good reason why the useage of the vfs_ function should go away from the filesystem code I don't think we want this.