]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: don't assume frag tree splits in mds reply are sorted
authorYan, Zheng <zyan@redhat.com>
Tue, 3 May 2016 12:55:50 +0000 (20:55 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 25 May 2016 23:15:37 +0000 (01:15 +0200)
commit6571610732148a3e79f6c0e1b750137b96f60706
tree58faee98894dd316c872a82e59e88307c25841a2
parente7aeef6b462aa4a79d15c6fc984bb2f4dfda67a5
ceph: don't assume frag tree splits in mds reply are sorted

The algorithm that updates i_fragtree relies on that the frag tree
splits in mds reply are of the same order of i_fragtree. This is not
true because current MDS encodes frag tree splits in ascending order
of (unsigned)frag_t. But nodes in i_fragtree are sorted according to
ceph_frag_compare().

The fix is sort the frag tree splits first, then updates i_fragtree.

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