Re: How to handle non-local renames?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > > Simpler: if alias and our dentry share the parent, it's locked and
> > > we can rename without s_vfs_rename_mutex.  If they do not, walk the
> > > tree under alias, unhash all non-directories and kill all directories.
> > 
> > What do you mean by "killing directories"?  Unhashing the inode?
> > 
> > Are these OK, without holding i_mutex on alias and descendents?
> 
> Only dcache locking is needed for unhashing dentries (which is what
> we do to non-directories).  For directories, we should silently
> unhash inodes and make sure that all future operations on those inodes
> would fail.  Up to filesystem how you do that.  Additionally, make
> sure that revalidation fails on those suckers.

OK, what about operations currently in progress on those directories
and files?  Is there no way these can cause trouble?

>  
> > > We keep local renames, we keep renames within directory and
> > > cross-directory rename on server ends up with invalidation when
> > > client notices it.
> > > 
> > > We don't _care_ if lookup() is not from rename.  That's OK.
> > 
> > Well, there's the strange case of shared parents and lookup moving the
> > source into the target, effectively completing the rename, and thus
> > making rename think the source and target were equal, although in fact
> > they weren't...
> 
> Which is fine, since we'll get 0, i.e. rename successful.  Tolerable,
> seeing that server _is_ playing games with us.

Not necessarily: it could have been two parallel renames doing the
same on two clients, one of them succeeding between the lookups on
source and target of the other.

But I'm not overly worried about this.

Miklos
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux