]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: fix replica dentry linkage updates
authorSage Weil <sage@newdream.net>
Fri, 12 Mar 2010 00:52:44 +0000 (16:52 -0800)
committerSage Weil <sage@newdream.net>
Tue, 16 Mar 2010 17:21:47 +0000 (10:21 -0700)
commit5c70d30b2899a46e11dd8669d56aa8ea67d3ce88
tree1df4dacf2ec79fdf1985f6f9f92c1e6ce37bdea3
parent010dd0fdd78da7dddcb155b9826856228f44bfa3
mds: fix replica dentry linkage updates

Previously we have a broken hack that would drop a replicated
null dentry if it got new linkage.  We already get an explicit
message if it was unlinked, that unlinks it cleanly.  Do the
same for links, and replicate the newly linked inode as
needed.  This is much cleaner and more correct.

Specifically, this fixes a problem where a create (link) and
unlink are pipelined by the same client under the same xlock,
so that the previous hack (in the handle_lock handler) never
triggers because the lock state doesn't toggle between the link
and unlink.

send_dentry_link sends current, not projected, linkage
src/include/ceph_fs.h
src/mds/Locker.cc
src/mds/MDCache.cc
src/mds/MDCache.h
src/mds/Server.cc
src/messages/MDentryLink.h [new file with mode: 0644]
src/msg/Message.cc
src/msg/Message.h