diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2016-04-28 10:07:23 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2016-05-25 18:36:26 -0400 |
commit | a66dd38309f5d9c66ec9bc7911ff8da8cc37bb9f (patch) | |
tree | 57fad995941d806f665191d8c5d88ba3f311337a /include/linux/ceph | |
parent | 63244fa123a755e4bbaee03022b68613c71d1332 (diff) |
libceph: switch to calc_target(), part 1
Replace __calc_request_pg() and most of __map_request() with
calc_target() and start using req->r_t.
ceph_osdc_build_request() however still encodes base_oid, because it's
called before calc_target() is and target_oid is empty at that point in
time; a printf in osdc_show() also shows base_oid. This is fixed in
"libceph: switch to calc_target(), part 2".
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'include/linux/ceph')
-rw-r--r-- | include/linux/ceph/osd_client.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h index 48806ee4488d..03bf9d9e1517 100644 --- a/include/linux/ceph/osd_client.h +++ b/include/linux/ceph/osd_client.h | |||
@@ -150,12 +150,13 @@ struct ceph_osd_request { | |||
150 | struct list_head r_linger_item; | 150 | struct list_head r_linger_item; |
151 | struct list_head r_linger_osd_item; | 151 | struct list_head r_linger_osd_item; |
152 | struct ceph_osd *r_osd; | 152 | struct ceph_osd *r_osd; |
153 | struct ceph_pg r_pgid; | 153 | |
154 | int r_pg_osds[CEPH_PG_MAX_SIZE]; | 154 | struct ceph_osd_request_target r_t; |
155 | int r_num_pg_osds; | 155 | #define r_base_oid r_t.base_oid |
156 | #define r_base_oloc r_t.base_oloc | ||
157 | #define r_flags r_t.flags | ||
156 | 158 | ||
157 | struct ceph_msg *r_request, *r_reply; | 159 | struct ceph_msg *r_request, *r_reply; |
158 | int r_flags; /* any additional flags for the osd */ | ||
159 | u32 r_sent; /* >0 if r_request is sending/sent */ | 160 | u32 r_sent; /* >0 if r_request is sending/sent */ |
160 | 161 | ||
161 | /* request osd ops array */ | 162 | /* request osd ops array */ |
@@ -167,7 +168,6 @@ struct ceph_osd_request { | |||
167 | __le64 *r_request_pool; | 168 | __le64 *r_request_pool; |
168 | void *r_request_pgid; | 169 | void *r_request_pgid; |
169 | __le32 *r_request_attempts; | 170 | __le32 *r_request_attempts; |
170 | bool r_paused; | ||
171 | struct ceph_eversion *r_request_reassert_version; | 171 | struct ceph_eversion *r_request_reassert_version; |
172 | 172 | ||
173 | int r_result; | 173 | int r_result; |
@@ -186,11 +186,6 @@ struct ceph_osd_request { | |||
186 | struct inode *r_inode; /* for use by callbacks */ | 186 | struct inode *r_inode; /* for use by callbacks */ |
187 | void *r_priv; /* ditto */ | 187 | void *r_priv; /* ditto */ |
188 | 188 | ||
189 | struct ceph_object_locator r_base_oloc; | ||
190 | struct ceph_object_id r_base_oid; | ||
191 | struct ceph_object_locator r_target_oloc; | ||
192 | struct ceph_object_id r_target_oid; | ||
193 | |||
194 | u64 r_snapid; | 189 | u64 r_snapid; |
195 | unsigned long r_stamp; /* send OR check time */ | 190 | unsigned long r_stamp; /* send OR check time */ |
196 | 191 | ||