aboutsummaryrefslogtreecommitdiffstats
path: root/net/ceph/osd_client.c
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2013-02-15 12:42:30 -0500
committerAlex Elder <elder@inktank.com>2013-02-18 13:20:26 -0500
commita9f36c3ed48dbfbad4cf8ba92142873b62923300 (patch)
treeb8a8952f57ca8fb394712f05a39d0b3c578c05d9 /net/ceph/osd_client.c
parent4c46459cae3b945e6e167f3f3a12b68f55cc5937 (diff)
libceph: remove dead code in osd_req_encode_op()
In osd_req_encode_op() there are a few cases that handle osd opcodes that are never used in the kernel. The presence of this code gives the impression it's correct (which really can't be assumed), and may impose some unnecessary restrictions on some upcoming refactoring of this code. So delete this effectively dead code, and report uses of the previously handled cases as unsupported. Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'net/ceph/osd_client.c')
-rw-r--r--net/ceph/osd_client.c31
1 files changed, 5 insertions, 26 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index ac7bcbf19574..bbd157592c6c 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -231,19 +231,6 @@ static void osd_req_encode_op(struct ceph_osd_request *req,
231 dst->extent.truncate_seq = 231 dst->extent.truncate_seq =
232 cpu_to_le32(src->extent.truncate_seq); 232 cpu_to_le32(src->extent.truncate_seq);
233 break; 233 break;
234
235 case CEPH_OSD_OP_GETXATTR:
236 case CEPH_OSD_OP_SETXATTR:
237 case CEPH_OSD_OP_CMPXATTR:
238 dst->xattr.name_len = cpu_to_le32(src->xattr.name_len);
239 dst->xattr.value_len = cpu_to_le32(src->xattr.value_len);
240 dst->xattr.cmp_op = src->xattr.cmp_op;
241 dst->xattr.cmp_mode = src->xattr.cmp_mode;
242 ceph_pagelist_append(&req->r_trail, src->xattr.name,
243 src->xattr.name_len);
244 ceph_pagelist_append(&req->r_trail, src->xattr.val,
245 src->xattr.value_len);
246 break;
247 case CEPH_OSD_OP_CALL: 234 case CEPH_OSD_OP_CALL:
248 dst->cls.class_len = src->cls.class_len; 235 dst->cls.class_len = src->cls.class_len;
249 dst->cls.method_len = src->cls.method_len; 236 dst->cls.method_len = src->cls.method_len;
@@ -256,21 +243,8 @@ static void osd_req_encode_op(struct ceph_osd_request *req,
256 ceph_pagelist_append(&req->r_trail, src->cls.indata, 243 ceph_pagelist_append(&req->r_trail, src->cls.indata,
257 src->cls.indata_len); 244 src->cls.indata_len);
258 break; 245 break;
259 case CEPH_OSD_OP_ROLLBACK:
260 dst->snap.snapid = cpu_to_le64(src->snap.snapid);
261 break;
262 case CEPH_OSD_OP_STARTSYNC: 246 case CEPH_OSD_OP_STARTSYNC:
263 break; 247 break;
264 case CEPH_OSD_OP_NOTIFY:
265 {
266 __le32 prot_ver = cpu_to_le32(src->watch.prot_ver);
267 __le32 timeout = cpu_to_le32(src->watch.timeout);
268
269 ceph_pagelist_append(&req->r_trail,
270 &prot_ver, sizeof(prot_ver));
271 ceph_pagelist_append(&req->r_trail,
272 &timeout, sizeof(timeout));
273 }
274 case CEPH_OSD_OP_NOTIFY_ACK: 248 case CEPH_OSD_OP_NOTIFY_ACK:
275 case CEPH_OSD_OP_WATCH: 249 case CEPH_OSD_OP_WATCH:
276 dst->watch.cookie = cpu_to_le64(src->watch.cookie); 250 dst->watch.cookie = cpu_to_le64(src->watch.cookie);
@@ -285,6 +259,7 @@ static void osd_req_encode_op(struct ceph_osd_request *req,
285 case CEPH_OSD_OP_MAPEXT: 259 case CEPH_OSD_OP_MAPEXT:
286 case CEPH_OSD_OP_MASKTRUNC: 260 case CEPH_OSD_OP_MASKTRUNC:
287 case CEPH_OSD_OP_SPARSE_READ: 261 case CEPH_OSD_OP_SPARSE_READ:
262 case CEPH_OSD_OP_NOTIFY:
288 case CEPH_OSD_OP_ASSERT_VER: 263 case CEPH_OSD_OP_ASSERT_VER:
289 case CEPH_OSD_OP_WRITEFULL: 264 case CEPH_OSD_OP_WRITEFULL:
290 case CEPH_OSD_OP_TRUNCATE: 265 case CEPH_OSD_OP_TRUNCATE:
@@ -297,6 +272,7 @@ static void osd_req_encode_op(struct ceph_osd_request *req,
297 case CEPH_OSD_OP_TMAPPUT: 272 case CEPH_OSD_OP_TMAPPUT:
298 case CEPH_OSD_OP_TMAPGET: 273 case CEPH_OSD_OP_TMAPGET:
299 case CEPH_OSD_OP_CREATE: 274 case CEPH_OSD_OP_CREATE:
275 case CEPH_OSD_OP_ROLLBACK:
300 case CEPH_OSD_OP_OMAPGETKEYS: 276 case CEPH_OSD_OP_OMAPGETKEYS:
301 case CEPH_OSD_OP_OMAPGETVALS: 277 case CEPH_OSD_OP_OMAPGETVALS:
302 case CEPH_OSD_OP_OMAPGETHEADER: 278 case CEPH_OSD_OP_OMAPGETHEADER:
@@ -310,7 +286,10 @@ static void osd_req_encode_op(struct ceph_osd_request *req,
310 case CEPH_OSD_OP_CLONERANGE: 286 case CEPH_OSD_OP_CLONERANGE:
311 case CEPH_OSD_OP_ASSERT_SRC_VERSION: 287 case CEPH_OSD_OP_ASSERT_SRC_VERSION:
312 case CEPH_OSD_OP_SRC_CMPXATTR: 288 case CEPH_OSD_OP_SRC_CMPXATTR:
289 case CEPH_OSD_OP_GETXATTR:
313 case CEPH_OSD_OP_GETXATTRS: 290 case CEPH_OSD_OP_GETXATTRS:
291 case CEPH_OSD_OP_CMPXATTR:
292 case CEPH_OSD_OP_SETXATTR:
314 case CEPH_OSD_OP_SETXATTRS: 293 case CEPH_OSD_OP_SETXATTRS:
315 case CEPH_OSD_OP_RESETXATTRS: 294 case CEPH_OSD_OP_RESETXATTRS:
316 case CEPH_OSD_OP_RMXATTR: 295 case CEPH_OSD_OP_RMXATTR: