]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
kclient: fix readdir vs rm
authorSage Weil <sage@newdream.net>
Wed, 17 Jun 2009 22:22:12 +0000 (15:22 -0700)
committerSage Weil <sage@newdream.net>
Wed, 17 Jun 2009 22:23:17 +0000 (15:23 -0700)
commit4e54d1176f50e35a3082245cde156927e37d6e29
tree4398beb9cfff63b15e0b59ab3d493755f1d55954
parent5fc7fe0ebde61ad6790dd83a7cc341660af4666e
kclient: fix readdir vs rm

Okay, do not rely on MDS to provide dentry positioning information,
since it is all relative to the start _string_ we provide, and that
can change directory position without notice.

Simplify readdir a bit wrt seeks.  A seek to 0, a new frag, or
prior to the current chunk resets buffered state.

For each frag, we walk through chunks, always in order.  We set
dentry positions/offsets based on the frag and position within our
sweep across the frag.  Successive chunks are grabbed from the MDS
relative to a filename (not offset), so concurrent
insertions/removals don't bother us (although we will not see
insertions lexicographically prior to our position).
src/kernel/dir.c
src/kernel/inode.c
src/kernel/mds_client.h
src/kernel/super.h