]> git.baikalelectronics.ru Git - kernel.git/commit
libceph: fix legacy layout decode with pool 0
authorYan, Zheng <zyan@redhat.com>
Wed, 9 Nov 2016 08:42:48 +0000 (16:42 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 10 Nov 2016 19:13:08 +0000 (20:13 +0100)
commit66732e5f6221e653be7977d16e4197f68130c3db
tree3dff38f7e8e8d2a03bc6fad89e57026fdf24f1c9
parentea9673d53f5011d56f2162b9963c0b422ffdfb91
libceph: fix legacy layout decode with pool 0

If your data pool was pool 0, ceph_file_layout_from_legacy()
transform that to -1 unconditionally, which broke upgrades.
We only want do that for a fully zeroed ceph_file_layout,
so that it still maps to a file_layout_t.  If any fields
are set, though, we trust the fl_pgpool to be a valid pool.

Fixes: 72458fdfbff8c ("libceph: define new ceph_file_layout structure")
Link: http://tracker.ceph.com/issues/17825
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
net/ceph/ceph_fs.c