]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: include counterpart's information in cap import/export messages
authorYan, Zheng <zheng.z.yan@intel.com>
Tue, 26 Nov 2013 03:02:49 +0000 (11:02 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Mon, 16 Dec 2013 04:15:25 +0000 (12:15 +0800)
commit4fdeb00df20ccd36c1e53c6ea234c63c18a9ff5a
treebf847cb2f9902d4b836cfc2ac6d47d664faccfa7
parentef902ee0b99f83b0396bfb1b3d3ba3e29cd31859
mds: include counterpart's information in cap import/export messages

when exporting indoes with client caps, the importer sends cap import
messages to clients, the exporter sends cap export messages to clients.
A client can receive these two messages in any order. If a client first
receives cap import message, it adds the imported caps. but the caps
from the exporter are still considered as valid. This can compromise
consistence. If MDS crashes while importing caps, clients can only
receive cap export messages, but don't receive cap import messages.
These clients don't know which MDS is the cap importer, so they can't
send cap reconnect when the MDS recovers.

We can handle above issues by including counterpart's information in
cap import/export messages. If a client first receives cap import
message, it added the imported caps, then removes the the exporter's
caps. If a client first receives cap export message, it removes the
exported caps, then adds caps for the importer.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/include/ceph_fs.h
src/include/types.h
src/mds/CInode.cc
src/mds/Capability.h
src/mds/MDCache.cc
src/mds/MDCache.h
src/mds/Migrator.cc
src/mds/Migrator.h
src/mds/Server.cc
src/messages/MClientCaps.h