]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: Delay export on missing inodes for reconnect 212/head
authorSam Lang <sam.lang@inktank.com>
Tue, 9 Apr 2013 15:35:19 +0000 (10:35 -0500)
committerSam Lang <sam.lang@inktank.com>
Thu, 11 Apr 2013 15:25:46 +0000 (10:25 -0500)
commit4977f3eab0cb265efeceeb02862c09e460549828
tree1f050a26f8bf1252daebdb49a594880c82d2e339
parent3a1cf53c30b67efbec46f893b3248939ca6d610c
mds: Delay export on missing inodes for reconnect

The reconnect caps sent by the client on reconnect may not have
inodes found in the inode cache until after clientreplay (when
the client creates a new file, for example). Currently, we send an
export for that cap to the client if we don't see an inode in the cache
and path_is_mine() returns false (for example, if the client didn't
send a path because the file was already unlinked).
Instead, we want to delay handling of the reconnect cap until
clientreplay completes.

This patch modifies handle_client_reconnect() so that we don't assume
the cap isn't ours if we don't have an inode for it, but instead delay
recovery for later. An export cap message is only sent if the inode exists
and the cap isn't ours (non-auth) during reconnect. If any remaining
recovered caps exist in the recovered list once the mds goes active, we
send export messages at that point.

Also, after removing the path_is_mine check,
MDCache::parallel_fetch_traverse_dir() needs to skip non-auth dirfrags.

Fixes #4451.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
src/mds/Capability.h
src/mds/MDCache.cc
src/mds/MDCache.h
src/mds/MDS.cc
src/mds/Server.cc