When the test was originally written, the "adler" algorithm was always available since the availability had nothing to do with performance. The change to make only a subset of algorithms available to the client was done in 2.2.58 so that clients would not choose the locally-fastest algorithm at the expense of selecting a slow algorithm on the server.
That said, this test should be exercising the client checksum selection if OBD_CONNECT_CKSUM is not available, in which case it should select adler:
test_77i() { # bug 13805
#define OBD_FAIL_OSC_CONNECT_CKSUM 0x40b
lctl set_param fail_loc=0x40b
remount_client $MOUNT
lctl set_param fail_loc=0
for VALUE in `lctl get_param osc.*osc-[^mM]*.checksum_type`; do
PARAM=`echo ${VALUE[0]} | cut -d "=" -f1`
algo=`lctl get_param -n $PARAM | sed 's/.*\[\(.*\)\].*/\1/g'`
[ "$algo" = "adler" ] || error "algo set to $algo instead of adler"
done
remount_client $MOUNT
}
run_test 77i "client not supporting OSD_CONNECT_CKSUM"
if (!OBD_FAIL_CHECK(OBD_FAIL_OSC_CONNECT_CKSUM)) {
/* OBD_CONNECT_CKSUM should always be set, even if checksums are
* disabled by default, because it can still be enabled on the
* fly via /proc. As a consequence, we still need to come to an
* agreement on the supported algorithms at connect time */
data->ocd_connect_flags |= OBD_CONNECT_CKSUM;
if (OBD_FAIL_CHECK(OBD_FAIL_OSC_CKSUM_ADLER_ONLY))
data->ocd_cksum_types = OBD_CKSUM_ADLER;
else
data->ocd_cksum_types = cksum_types_supported_client();
}
if (ocd->ocd_connect_flags & OBD_CONNECT_CKSUM) {
/* We sent to the server ocd_cksum_types with bits set
* for algorithms we understand. The server masked off
* the checksum types it doesn't support */
:
:
} else {
/* The server does not support OBD_CONNECT_CKSUM.
* Enforce ADLER for backward compatibility*/
cli->cl_supp_cksum_types = OBD_CKSUM_ADLER;
}
though the old comments and debug message in ofd_parse_connect_data() would have you think otherwise (they were not updated as part of http://review.whamcloud.com/3098 when the fallback was changed from crc32 to adler), but that should not actually have any effect on operation:
} else {
/* This client does not support OBD_CONNECT_CKSUM
* fall back to CRC32 */
CDEBUG(D_RPCTRACE, "%s: cli %s does not support "
"OBD_CONNECT_CKSUM, CRC32 will be used\n",
exp->exp_obd->obd_name, obd_export_nid2str(exp));
}
So this test shouldn't have anything to do with the relative speed of the algorithms.
It may be that the test is racy and the fail_loc is cleared before all of the OSC connections have been made? It might make sense to move the fail_loc=0 line to just before the second remount to avoid this problem.
Ashish Purkar (ashish.purkar@seagate.com) uploaded a new patch: http://review.whamcloud.com/23644
Subject:
LU-5361tests: Incorrect checksum algorithm reportedProject: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: a476729a9ca737bd00d611c870837d2b7977317c