]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: fix I_COMPLETE_ORDERED checking 2876/head
authorYan, Zheng <zyan@redhat.com>
Mon, 27 Oct 2014 20:57:16 +0000 (13:57 -0700)
committerYan, Zheng <zyan@redhat.com>
Fri, 7 Nov 2014 10:34:01 +0000 (18:34 +0800)
commita5984ba34cb684dae623df22e338f350c8765ba5
tree36e3b5940ac4a62f7f71effcca142b48b00423c9
parentb5ff4e99c87958211e4b7716b59084fc3417ec17
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>
(cherry picked from commit a4caed8a53d011b214ab516090676641f7c4699d)
src/client/Client.cc
src/client/Client.h
src/client/Dir.h
src/client/Inode.h