libceph: define osd_req_opcode_valid()
authorAlex Elder <elder@inktank.com>
Thu, 14 Mar 2013 01:50:00 +0000 (20:50 -0500)
committerSage Weil <sage@inktank.com>
Thu, 2 May 2013 04:17:44 +0000 (21:17 -0700)
commita8dd0a37bc016cfb3ac75cf8484428573bb8d862
tree4bd078753c105f3b1946457fdceb43f286f1b7cc
parentadfe695a25e92e3a4597807fbc7f9a8105218776
libceph: define osd_req_opcode_valid()

Define a separate function to determine the validity of an opcode,
and use it inside osd_req_encode_op() in order to unclutter that
function.

Don't update the destination op at all--and return zero--if an
unsupported or unrecognized opcode is seen in osd_req_encode_op().

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
net/ceph/osd_client.c