Whamcloud - gitweb
LU-6808 ptlrpc: no need to reassign mbits for replay 48/23048/6
authorNiu Yawei <yawei.niu@intel.com>
Mon, 10 Oct 2016 11:08:54 +0000 (07:08 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 25 Oct 2016 02:20:18 +0000 (02:20 +0000)
commit48488fa271e4444e4a2ab4f3babb6c91b779634e
tree473e6d191ab25d1df1fc95040f561fd2b1f9bacf
parent449fe54db666a3ad29503a55aa0f048b5f1d6543
LU-6808 ptlrpc: no need to reassign mbits for replay

It's not necessary reassgin & re-adjust rq_mbits for replay
request in ptlrpc_set_bulk_mbits(), they all must have already
been correctly assigned before.

Such unecessary reassign could make the first matchbit not
PTLRPC_BULK_OPS_MASK aligned, that'll trigger LASSERT in
ptlrpc_register_bulk():

- ptlrpc_set_bulk_mbits() is called when first time sending
  request, rq_mbits is set as xid, which is BULK_OPS aligned;

- ptlrpc_set_bulk_mbits() continue to adjust the mbits for
  multi-bulk RPC, rq_mbits is not aligned anymore, then rq_xid
  is changed accordingly if client is connecting to an old
  server, so rq_xid became unaligned too;

- The request is replayed, ptlrpc_set_bulk_mbits() reassign
  the rq_mbits as rq_xid, which isn't aligned already, but
  ptlrpc_register_bulk() still assumes this value as the
  first matchbits and LASSERT it's BULK_OPS aligned.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Ib5d5a969702d3b621fb44643586cc19bf931c365
Reviewed-on: http://review.whamcloud.com/23048
Tested-by: Jenkins
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/ptlrpc/client.c