]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: introduce a new inode flag indicating if cached dentries are ordered
authorYan, Zheng <zyan@redhat.com>
Wed, 22 Oct 2014 01:09:56 +0000 (18:09 -0700)
committerIlya Dryomov <idryomov@redhat.com>
Wed, 17 Dec 2014 17:09:50 +0000 (20:09 +0300)
commitbf49bf5bba27b56ed5befb24d402a47ada90875b
tree1a15d801442d91ec3ea98a84eedc03d61ee3127f
parent1b4bc0186293a874a5bc89c7cf812bd1d32d7fdf
ceph: introduce a new inode flag indicating if cached dentries are ordered

After creating/deleting/renaming file, offsets of sibling dentries may
change. So we can not use cached dentries to satisfy readdir. But we can
still use the cached dentries to conclude -ENOENT for lookup.

This patch introduces a new inode flag indicating if child dentries are
ordered. The flag is set at the same time marking a directory complete.
After creating/deleting/renaming file, we clear the flag on directory
inode. This prevents ceph_readdir() from using cached dentries to satisfy
readdir syscall.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
fs/ceph/dir.c
fs/ceph/inode.c
fs/ceph/super.h