aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ceph
diff options
context:
space:
mode:
authorIlya Dryomov <ilya.dryomov@inktank.com>2014-01-27 10:40:20 -0500
committerIlya Dryomov <ilya.dryomov@inktank.com>2014-01-27 16:57:53 -0500
commit205ee1187a671c3b067d7f1e974903b44036f270 (patch)
tree2a310516bcf7fdfb769c360a9fcfce85f501f57a /include/linux/ceph
parent3c972c95c68f455d80ff185aa440857be046bbe0 (diff)
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>
Diffstat (limited to 'include/linux/ceph')
-rw-r--r--include/linux/ceph/osd_client.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h
index 3170ca6d98b2..fd47e872ebcc 100644
--- a/include/linux/ceph/osd_client.h
+++ b/include/linux/ceph/osd_client.h
@@ -155,6 +155,8 @@ struct ceph_osd_request {
155 155
156 struct ceph_object_locator r_base_oloc; 156 struct ceph_object_locator r_base_oloc;
157 struct ceph_object_id r_base_oid; 157 struct ceph_object_id r_base_oid;
158 struct ceph_object_locator r_target_oloc;
159 struct ceph_object_id r_target_oid;
158 160
159 u64 r_snapid; 161 u64 r_snapid;
160 unsigned long r_stamp; /* send OR check time */ 162 unsigned long r_stamp; /* send OR check time */
@@ -162,6 +164,10 @@ struct ceph_osd_request {
162 struct ceph_snap_context *r_snapc; /* snap context for writes */ 164 struct ceph_snap_context *r_snapc; /* snap context for writes */
163}; 165};
164 166
167struct ceph_request_redirect {
168 struct ceph_object_locator oloc;
169};
170
165struct ceph_osd_event { 171struct ceph_osd_event {
166 u64 cookie; 172 u64 cookie;
167 int one_shot; 173 int one_shot;