]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
ceph: let MDS adjust readdir 'frag'
authorYan, Zheng <zheng.z.yan@intel.com>
Mon, 3 Mar 2014 01:20:44 +0000 (09:20 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Thu, 3 Apr 2014 02:33:52 +0000 (10:33 +0800)
If readdir 'frag' is adjusted, readdir 'offset' should be reset.
Otherwise some dentries may be lost when readdir and fragmenting
directory happen at the some.

Another way to fix this issue is let MDS adjust readdir 'frag'.
The code that handles MDS reply reset the readdir 'offset' if
the readdir reply is different than the requested one.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
fs/ceph/dir.c

index 8ce8833e9c028b028799671a38876c1bfdf381d2..e9918a0306d1906ca7456b4038d6246ef1740e7e 100644 (file)
@@ -322,9 +322,6 @@ more:
                        fi->last_readdir = NULL;
                }
 
-               /* requery frag tree, as the frag topology may have changed */
-               frag = ceph_choose_frag(ceph_inode(inode), frag, NULL, NULL);
-
                dout("readdir fetching %llx.%llx frag %x offset '%s'\n",
                     ceph_vinop(inode), frag, fi->last_name);
                req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS);