]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: fix I_COMPLETE_ORDERED checking 2813/head
authorYan, Zheng <zyan@redhat.com>
Mon, 27 Oct 2014 20:57:16 +0000 (13:57 -0700)
committerYan, Zheng <zyan@redhat.com>
Mon, 27 Oct 2014 22:27:37 +0000 (15:27 -0700)
commita4caed8a53d011b214ab516090676641f7c4699d
tree406b77202a397dde1fbe880b0fde34e946998b8e
parent10382d1b8e1618c3e7c700ad0a4ec4ae29b0bc77
client: fix I_COMPLETE_ORDERED checking

Current code marks a directory inode as complete and ordered when readdir
finishes, but it does not check if the directory was modified in the middle
of readdir. This is wrong, directory inode should not be marked as ordered
if it was modified during readddir

The fix is introduce a new counter to the inode data struct, we increase
the counter each time the directory is modified. When readdir finishes, we
check the counter to decide if the directory should be marked as ordered.

Fixes: #9894
Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/client/Client.cc
src/client/Client.h
src/client/Dir.h
src/client/Inode.h