diff options
author | Oleg Drokin <green@linuxhacker.ru> | 2014-10-11 22:46:52 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-29 16:21:55 +0800 |
commit | 0237d9dc94b6e5f1e31c0db90bce6301d0884350 (patch) | |
tree | 0eba9ce48d5ce7af317969aaa69d5b218bff0c20 /drivers/staging/lustre/lustre/ptlrpc/pack_generic.c | |
parent | 1bca2822b4420dfc1f7f40bbea5011bbf25e1113 (diff) |
staging/lustre/ptlrpc: get rid of lustre 1.8 compatible checksums
Old version of lustre (1.8) calculated RPC checksums differently,
but the compat code is no longer important since in-kernel
version of lustre is nto compatible with 1.8 lustre servers
(that are long deprecated too).
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/ptlrpc/pack_generic.c')
-rw-r--r-- | drivers/staging/lustre/lustre/ptlrpc/pack_generic.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c index 50556db15f79..60552f4e9798 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c +++ b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c @@ -1313,43 +1313,17 @@ __u32 lustre_msg_get_cksum(struct lustre_msg *msg) } } -#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 50, 0) -/* - * In 1.6 and 1.8 the checksum was computed only on struct ptlrpc_body as - * it was in 1.6 (88 bytes, smaller than the full size in 1.8). It makes - * more sense to compute the checksum on the full ptlrpc_body, regardless - * of what size it is, but in order to keep interoperability with 1.8 we - * can optionally also checksum only the first 88 bytes (caller decides). */ -# define ptlrpc_body_cksum_size_compat18 88 - -__u32 lustre_msg_calc_cksum(struct lustre_msg *msg, int compat18) -#else -# warning "remove checksum compatibility support for b1_8" __u32 lustre_msg_calc_cksum(struct lustre_msg *msg) -#endif { switch (msg->lm_magic) { case LUSTRE_MSG_MAGIC_V2: { struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg); -#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 50, 0) - __u32 crc; - unsigned int hsize = 4; - __u32 len = compat18 ? ptlrpc_body_cksum_size_compat18 : - lustre_msg_buflen(msg, MSG_PTLRPC_BODY_OFF); - LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg); - cfs_crypto_hash_digest(CFS_HASH_ALG_CRC32, (unsigned char *)pb, - len, NULL, 0, (unsigned char *)&crc, - &hsize); - return crc; -#else -# warning "remove checksum compatibility support for b1_8" __u32 crc; unsigned int hsize = 4; cfs_crypto_hash_digest(CFS_HASH_ALG_CRC32, (unsigned char *)pb, lustre_msg_buflen(msg, MSG_PTLRPC_BODY_OFF), NULL, 0, (unsigned char *)&crc, &hsize); return crc; -#endif } default: CERROR("incorrect message magic: %08x\n", msg->lm_magic); |