Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
On Mon, Apr 13, 2009 at 09:30:38AM -0400, Chris DiMartino wrote: > For informational purposes, I was not able to get 2.6.29.1 to work with > DRBD. I was forced to roll back a kernel version (2.6.28.9). It > compiled and loaded and functions properly against this kernel. This > kernel was compiled with the same options as the 2.6.29.1 kernel. > > > Tomasz Chmielewski wrote: >>> I've just installed 8.3.1 against my compiled version of 2.6.29.1. >>> I've installed sha1 as part of kernel, and md5 and most other digest >>> crypto as modules. When attempting to set verify-alg or csums-alg, I >>> get the following: >>> >>> 0: Failure: (145) CSUMSAlgNotDigest >>> Command 'drbdsetup 0 syncer --set-defaults --create-device >>> --verify-alg=sha1 --csums-alg=sha1 --al-extents=127 --rate=110M' >>> terminated with exit code 10 >>> 1: Failure: (145) CSUMSAlgNotDigest >> >> Same here. >> After I've upgraded to 8.3.1 and 2.6.29.1 I can't start drbd any more, >> with the same message as above. please apply on top of drbd 8.3.1. will be released with 8.3.2. until we announce 8.3.2 release candidates, I recommend against using drbd .git directly, as we are in the process of extending the wire protocol again, and did not yet finally decide how exactly that will be done. thanks. commit f618322ed871e1a0cf810ad5aa559c5133fa5a55 Author: Lars Ellenberg <lars.ellenberg at linbit.com> Date: Tue Apr 14 14:50:34 2009 +0200 crypto shash compatibility most algorithms have been switched to the shash interface now. DRBD would have rejected those with "not a digest", because CRYPTO_ALG_TYPE_HASH != CRYPTO_ALG_TYPE_SHASH... better check for (type & MASK) == HASH diff --git a/drbd/drbd_nl.c b/drbd/drbd_nl.c index 802a879..409bfb7 100644 --- a/drbd/drbd_nl.c +++ b/drbd/drbd_nl.c @@ -1199,6 +1199,12 @@ STATIC int drbd_nl_detach(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp, return 0; } +static int drbd_crypto_is_hash(struct crypto_tfm *tfm) +{ + return (crypto_tfm_alg_type(tfm) & CRYPTO_ALG_TYPE_HASH_MASK) + == CRYPTO_ALG_TYPE_HASH; +} + STATIC int drbd_nl_net_conf(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp, struct drbd_nl_cfg_reply *reply) { @@ -1319,7 +1325,7 @@ STATIC int drbd_nl_net_conf(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp, goto fail; } - if (crypto_tfm_alg_type(crypto_hash_tfm(integrity_w_tfm)) != CRYPTO_ALG_TYPE_DIGEST) { + if (!drbd_crypto_is_hash(crypto_hash_tfm(integrity_w_tfm))) { retcode=IntegrityAlgNotDigest; goto fail; } @@ -1639,7 +1645,7 @@ STATIC int drbd_nl_syncer_conf(struct drbd_conf *mdev, struct drbd_nl_cfg_req *n goto fail; } - if (crypto_tfm_alg_type(crypto_hash_tfm(csums_tfm)) != CRYPTO_ALG_TYPE_DIGEST) { + if (!drbd_crypto_is_hash(crypto_hash_tfm(csums_tfm))) { retcode = CSUMSAlgNotDigest; goto fail; } @@ -1663,7 +1669,7 @@ STATIC int drbd_nl_syncer_conf(struct drbd_conf *mdev, struct drbd_nl_cfg_req *n goto fail; } - if (crypto_tfm_alg_type(crypto_hash_tfm(verify_tfm)) != CRYPTO_ALG_TYPE_DIGEST) { + if (!drbd_crypto_is_hash(crypto_hash_tfm(verify_tfm))) { retcode = VERIFYAlgNotDigest; goto fail; } -- : Lars Ellenberg : LINBIT | Your Way to High Availability : DRBD/HA support and consulting http://www.linbit.com DRBD® and LINBIT® are registered trademarks of LINBIT, Austria. __ please don't Cc me, but send to list -- I'm subscribed