[Ocfs2-devel] [PATCH] quota: Fix deadlock during path resolution

Jan Kara jack at suse.cz
Thu Sep 16 02:55:53 PDT 2010


On Thu 16-09-10 00:52:08, Christoph Hellwig wrote:
> On Wed, Sep 15, 2010 at 11:39:51PM +0200, Jan Kara wrote:
> > As Al Viro pointed out path resolution during Q_QUOTAON calls to quotactl
> > is prone to deadlocks. We hold s_umount semaphore for reading during the
> > path resolution and resolution itself may need to acquire the semaphore
> > for writing when e. g. autofs mountpoint is passed.
> > 
> > Solve the problem by performing the resolution before we get hold of the
> > superblock (and thus s_umount semaphore). The whole thing is complicated
> > by the fact that some filesystems (OCFS2) ignore the path argument. So to
> > distinguish between filesystem which want the path and which do not we
> > introduce new .quota_on_meta callback which does not get the path. OCFS2
> > then uses this callback instead of old .quota_on.
> 
> FYI I have a patch that switches ocfs to share the quota_on method with
> XFS which behaves the same, and consolidate the quota_off method for all
> filesystems.  I think that's better than adding yet another method.
> 
> I'll rebase it and send it out soon.
  Ok, that would be nice. I'll wait with my fix then.

								Honza
-- 
Jan Kara <jack at suse.cz>
SUSE Labs, CR



More information about the Ocfs2-devel mailing list