Browse files

ceph: fix __dcache_readdir()

If directory is fragmented, readdir() read its dirfrags one by one.
After reading all dirfrags, the corresponding dentries are sorted in
(frag_t, off) order in the dcache. If dentries of a directory are all
cached, __dcache_readdir() can use the cached dentries to satisfy
readdir syscall. But when checking if a given dentry is after the
position of readdir, __dcache_readdir() compares numerical value of
frag_t directly. This is wrong, it should use ceph_frag_compare().

Signed-off-by: Yan, Zheng <>
  • Loading branch information...
1 parent 45195e4 commit 4d5f5df673ee673851986b5a492a9752fbb39dc5 Yan, Zheng committed with liewegas Feb 13, 2014
Showing with 9 additions and 1 deletion.
  1. +9 −1 fs/ceph/dir.c
Oops, something went wrong.

0 comments on commit 4d5f5df

Please sign in to comment.