libceph: follow redirect replies from osds
authorIlya Dryomov <ilya.dryomov@inktank.com>
Mon, 27 Jan 2014 15:40:20 +0000 (17:40 +0200)
committerIlya Dryomov <ilya.dryomov@inktank.com>
Mon, 27 Jan 2014 21:57:53 +0000 (23:57 +0200)
commit205ee1187a671c3b067d7f1e974903b44036f270
tree2a310516bcf7fdfb769c360a9fcfce85f501f57a
parent3c972c95c68f455d80ff185aa440857be046bbe0
libceph: follow redirect replies from osds

Follow redirect replies from osds, for details see ceph.git commit
fbbe3ad1220799b7bb00ea30fce581c5eadaf034.

v1 (current) version of redirect reply consists of oloc and oid, which
expands to pool, key, nspace, hash and oid.  However, server-side code
that would populate anything other than pool doesn't exist yet, and
hence this commit adds support for pool redirects only.  To make sure
that future server-side updates don't break us, we decode all fields
and, if any of key, nspace, hash or oid have a non-default value, error
out with "corrupt osd_op_reply ..." message.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
include/linux/ceph/osd_client.h
net/ceph/osd_client.c