From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [WTFoTW] ->quota_on() deadlocks Date: Fri, 2 Jul 2010 12:25:04 +0200 Message-ID: <20100702102504.GA24016@lst.de> References: <20100701185629.GJ31073@ZenIV.linux.org.uk> <20100701223822.GA495@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, Jan Kara , Joel Becker , Christoph Hellwig To: Al Viro Return-path: Received: from verein.lst.de ([213.95.11.210]:60227 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754023Ab0GBK0F (ORCPT ); Fri, 2 Jul 2010 06:26:05 -0400 Content-Disposition: inline In-Reply-To: <20100701223822.GA495@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Jul 02, 2010 at 12:38:22AM +0200, Christoph Hellwig wrote: > I have patches in my queue that should fix this as a side effect. > > First thing is splitting the set_xstate method currently only > used by XFS into ->quota_enable, ->quota_disable and ->quota_remove, > second is using merging ->quota_disable and ->quota_off, third > is switching ocfs2 to ->quota_disable and fourth is taking the > path lookup from ->quota_on into the caller. > > I'll try to get them out to the list in a couple of days. Shouldn't have replied in the middle of the night. The above doesn't fix the deadlock yet, but by allowing different methods would allow to fix it in hacky ways. Now the real questions is: do we need to support quota files on different filesystems? For ext3/4 and reiserfs with journaled quota we already reject that. If we always reject it or even further restrict quota files to sit in the root of the filesystem we can replace the kernel_path with a relative lookup that doesn't cross mountpoints. In the idea case of restricting it to the root that would be just a lookup_one_len, just as we do in dquot_quota_on_mount, otherwise something hand crafted.