ceph: fix readdir vs fragmentation race
authorYan, Zheng <zyan@redhat.com>
Wed, 12 Oct 2016 06:48:28 +0000 (14:48 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 18 Oct 2016 10:09:58 +0000 (12:09 +0200)
commitf72f94555aa32b2c4374dde5ad9b960cc4ff32e2
treeea39f8a0ae76f31f4f8004fd7045824ae608e5bb
parent0d7718f666be181fda1ba2d08f137d87c1419347
ceph: fix readdir vs fragmentation race

following sequence of events tigger the race

- client readdir frag 0* -> got item 'A'
- MDS merges frag 0* and frag 1*
- client send readdir request (frag 1*, offset 2, readdir_start 'A')
- MDS reply items (that are after item 'A') in frag *

Link: http://tracker.ceph.com/issues/17286
Signed-off-by: Yan, Zheng <zyan@redhat.com>
fs/ceph/inode.c