OSDN Git Service

rbd: pass length, not op for osd completions
authorAlex Elder <elder@inktank.com>
Tue, 26 Feb 2013 20:23:07 +0000 (14:23 -0600)
committerSage Weil <sage@inktank.com>
Tue, 26 Feb 2013 23:00:06 +0000 (15:00 -0800)
commitc47f9371545abe2510ac3b66c3fc180921816f65
tree4e27f3f2f7a7102a584b9755f0783fc34d77f9e5
parent39bf2c5d096729939cab657fe641044eceaa84a2
rbd: pass length, not op for osd completions

The only thing type-specific osd completion functions do with their
osd op parameter is (in some cases) extract the number of bytes
transferred from it.  In the other cases, the xferred bytes field
is not used, and total message data transfer byte count (which may
well be zero) is used.

Just set the object request transfer count in the main osd request
callback function and provide that to the other routines.  There is
then no longer any need to pass the op pointer to the type-specific
completion routines, so drop those parameters.

Stop doing anything with the total message data length.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
drivers/block/rbd.c