When the bulk RPC checksums were originally introduced they were
disabled by default, and marked with an unlikely() annotation for
the compiler to optimize branch prediction. Checksums are now
enabled by default, so this compiler annotation is incorrect.
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ib1d5c09da732224dfd331c1ce07a252a441ed549
Reviewed-on: http://review.whamcloud.com/2197
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
/* size[REQ_REC_OFF] still sizeof (*body) */
if (opc == OST_WRITE) {
- if (unlikely(cli->cl_checksum) &&
+ if (cli->cl_checksum &&
!sptlrpc_flavor_has_bulk(&req->rq_flvr)) {
/* store cl_cksum_type in a local variable since
* it can be changed via lprocfs */
req_capsule_set_size(pill, &RMF_RCS, RCL_SERVER,
sizeof(__u32) * niocount);
} else {
- if (unlikely(cli->cl_checksum) &&
+ if (cli->cl_checksum &&
!sptlrpc_flavor_has_bulk(&req->rq_flvr)) {
if ((body->oa.o_valid & OBD_MD_FLFLAGS) == 0)
body->oa.o_flags = 0;
no_reply = rc != 0;
skip_transfer:
- if (unlikely(client_cksum != 0 && rc == 0)) {
+ if (client_cksum != 0 && rc == 0) {
static int cksum_counter;
repbody->oa.o_valid |= OBD_MD_FLCKSUM | OBD_MD_FLFLAGS;
repbody->oa.o_flags &= ~OBD_FL_CKSUM_ALL;
*/
repbody->oa.o_valid &= ~(OBD_MD_FLMTIME | OBD_MD_FLATIME);
- if (unlikely(client_cksum != server_cksum && rc == 0 && !mmap)) {
+ if (unlikely(client_cksum != server_cksum && rc == 0 && !mmap)) {
int new_cksum = ost_checksum_bulk(desc, OST_WRITE, cksum_type);
char *msg;
char *via;