breaking leases on metadata changes

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

 



So there's this longstanding problem that read leases should really be
broken on anything that changes an inode's metadata or any change to the
set of links pointing to the inode.

(Cc'ing samba-technical for confirmation of that statement from Samba's
point of view....)

So we need mutual exclusion between read leases and link, unlink,
rename, etc.

After contemplating increasingly complicated solutions for much too
long, I realized that the i_mutex is taken by all of those operations
except for rename--and it looks to me like rename could take i_mutex on
a renamed file as well.

So, here's my attempt.  It passes some simple tests.  Is it sane?

I tried updating Documentation/filesystems/directory-locking to reflect
the rename change, but without thinking it through as carefully as I'd
like to.

Also, the one thing I *know* is wrong: lockdep doesn't like the rename
change, and I haven't tried to figure out how to fix it.  (Help?)

These patches assume some previous lease fixes already committed to

	git://linux-nfs.org/~bfields/linux.git for-3.2

--b.
--
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