]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
kclient: fix I_COMPLETE
authorSage Weil <sage@newdream.net>
Mon, 15 Jun 2009 22:35:10 +0000 (15:35 -0700)
committerSage Weil <sage@newdream.net>
Mon, 15 Jun 2009 23:19:45 +0000 (16:19 -0700)
commit60ec1cbe0ecc1e57d22c0eccffcb3b30faf7f5b9
treeccb18802071f6b4d0317408df578f832f58aadc1
parentfd7c1f3f99386282ca26561f8e4c56294b6c29d2
kclient: fix I_COMPLETE

The previous use of I_READDIR vs I_COMPLETE was flawed, mainly because
the state was maintained on a per-inode basis, but readdir proceeds on a
per-file basis.

Instead of flags, maintain a counter in the inode that is incremented each
time a dentry is released.  When readdir starts, note the counter, and if
it is the same when readdir completes, AND we did not do any forward
seeks on the file handle, AND prepopulate succeeded on each hunk, then we
can set I_COMPLETE.
src/kernel/dir.c
src/kernel/inode.c
src/kernel/mds_client.h
src/kernel/super.h
src/mds/Server.cc