]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
kclient: fix di->off calculation
authorSage Weil <sage@newdream.net>
Mon, 15 Jun 2009 23:16:57 +0000 (16:16 -0700)
committerSage Weil <sage@newdream.net>
Mon, 15 Jun 2009 23:19:49 +0000 (16:19 -0700)
commit0a7e55946a0dc8204e6ffb895c487191da22df8b
tree6bdb6e18e46fcc840a2eccd6758331876abb3ac1
parent60ec1cbe0ecc1e57d22c0eccffcb3b30faf7f5b9
kclient: fix di->off calculation

The dentry dir offset calculation wasn't taking into account the
possibility of multiple readdi requests, which in turn meant bad results
for readdir-from-dcache.

Since doing this on the client side was a mess, the MDS includes a dentry
offset for each readdir dentry within the dirfrag.  This value is stored
in di->offset (with adjustment in leftmost frag for . and ..), and that's
the value that's passed back via filldir.
src/client/Client.cc
src/include/ceph_fs.h
src/kernel/dir.c
src/kernel/inode.c
src/kernel/mds_client.c
src/kernel/mds_client.h
src/mds/Server.cc