]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: start caching readdir results after readdir_start
authorAlexandre Oliva <lxoliva@fsfla.org>
Tue, 10 Jan 2012 03:41:45 +0000 (01:41 -0200)
committerSage Weil <sage.weil@dreamhost.com>
Wed, 11 Jan 2012 04:25:32 +0000 (20:25 -0800)
Use upper_bound rather than lower_bound to compute the initial pd within
insert_trace, so that we don't attempt to remove it if it happens to be
in the same frag as the new reply.

Fixes: #1774
Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/client/Client.cc

index 7c8b771907fe6906d3e45d0a5518766c4a9dbe38..0aed0b285e1ebc8029cc2050b21c0a193931b8f5 100644 (file)
@@ -789,7 +789,7 @@ Inode* Client::insert_trace(MetaRequest *request, int mds)
     request->readdir_end = end;
     request->readdir_num = numdn;
 
-    map<string,Dentry*>::iterator pd = dir->dentry_map.lower_bound(request->readdir_start);
+    map<string,Dentry*>::iterator pd = dir->dentry_map.upper_bound(request->readdir_start);
 
     frag_t fg = request->readdir_frag;
     Inode *diri = in;