]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
client: fix readdir + cap recovation/reissue race
authorSage Weil <sage@newdream.net>
Wed, 24 Aug 2011 21:38:25 +0000 (14:38 -0700)
committerSage Weil <sage@newdream.net>
Wed, 24 Aug 2011 21:38:25 +0000 (14:38 -0700)
commitd69aa5909e5467cb32127055c38f54e0dd2211e0
treeea90425949549c9d27b0caf356ea7489629f2bc7
parenta1afa6d7d1db8a620f7a8373cf638db01e51220e
client: fix readdir + cap recovation/reissue race

The current race:
 - we start readdir
 - mds revokes dir cap
 - some file gets removed
 - mds reissues dir cap
 - we finish readdir and set I_COMPLETE

We should only set it if there have been no FILE_SHARED reissues during
the readdir.

Note that we still set I_COMPLETE even if we don't have the cap; that's
useless but harmless, since it is undefined without FILE_SHARED being
set.

Signed-off-by: Sage Weil <sage@newdream.net>
src/client/Client.cc
src/client/Client.h