[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: locking patches for ufs_rename
On Thu, Oct 29, 2009 at 06:03:37PM +0100, Rhialto wrote:
> > > Would it make sense to use a global lock only for cross-directory
> > > renames, and not for in-directory renames?
> > Yes.
> What if one rename renames (moves) across directories, into some other
> directory where an in-directory rename is going on? Or away from such a
> directory? The one move might take the global lock, but not the other.
> Is that a problem?
I don't think so. As posted elsewhere the global lock serves two
purposes: first, to prevent deadlock if someone sets up a cycle of
renames among incommensurate portions of the tree, which a
same-directory rename inherently can't participate in; and second, to
make sure the parent check doesn't become invalid while the rename is
running. A same-directory rename can't give a subdirectory different
parents, so this should be ok also.
It might allow other more subtle inconsistencies in observed behavior;
however, there are already plenty of such cases and it's not at all
clear that they matter.
David A. Holland
Main Index |
Thread Index |