X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Finclude%2Fobd_cksum.h;h=029d1a7275cff22b45308417167f55f574bb4840;hp=8234d0b650aa96d085f6d9bdc47a071c4b5216bc;hb=5e9059e08aec6fb36de6788465978de0e962b956;hpb=e4f3f47f04c762770bc36c1e3fa7e92e94a36704 diff --git a/lustre/include/obd_cksum.h b/lustre/include/obd_cksum.h index 8234d0b..029d1a7 100644 --- a/lustre/include/obd_cksum.h +++ b/lustre/include/obd_cksum.h @@ -121,6 +121,13 @@ enum cksum_types obd_cksum_type_select(const char *obd_name, if (preferred & cksum_types) return preferred; + /* + * Server reporting a single T10 checksum type + * means the target actually supports T10-PI. + */ + if (hweight32(cksum_types & OBD_CKSUM_T10_ALL) == 1) + return cksum_types & OBD_CKSUM_T10_ALL; + flag = obd_cksum_type_pack(obd_name, cksum_types); return obd_cksum_type_unpack(flag);