]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: skip fragment space check for replayed request
authorYan, Zheng <zyan@redhat.com>
Wed, 25 Jan 2017 03:03:45 +0000 (11:03 +0800)
committerNathan Cutler <ncutler@suse.com>
Fri, 14 Apr 2017 21:48:02 +0000 (23:48 +0200)
when handling replayed request, stray directory can be different
from the stray directory used by the original request. The fragment
space check for stray directory can fail.

Fixes: http://tracker.ceph.com/issues/18660
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit afe889cbc5baab196567c2aad01f49fe90901fda)

src/mds/Server.cc

index 4fa218980f2e5a8a946b66feb6a0ef3741437f4a..007ee12802ee0c6e3ba49c44542eb105e933f0a5 100644 (file)
@@ -2270,7 +2270,8 @@ CDentry* Server::prepare_stray_dentry(MDRequestRef& mdr, CInode *in)
 
   CDir *straydir = mdcache->get_stray_dir(in);
 
-  if (!check_fragment_space(mdr, straydir))
+  if (!mdr->client_request->is_replay() &&
+      !check_fragment_space(mdr, straydir))
     return NULL;
 
   straydn = mdcache->get_or_create_stray_dentry(in);