diff options
author | Andreas Gruenbacher <agruen@linbit.com> | 2011-04-27 15:00:12 -0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2012-11-08 10:52:58 -0500 |
commit | 5b614abe30645c3a528d54ff01da94fde0770c43 (patch) | |
tree | d49d1970be98a4c329b6092710e26c60c42a6c07 | |
parent | 8d412fc6d58ae5e2e43f84461dd123bd0168b310 (diff) |
drbd: Rename integrity_r_tfm -> peer_integrity_tfm
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
-rw-r--r-- | drivers/block/drbd/drbd_int.h | 2 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 8 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_nl.c | 12 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_receiver.c | 12 |
4 files changed, 17 insertions, 17 deletions
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index 4787c79040c9..e6e4f4e64107 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h | |||
@@ -850,7 +850,7 @@ struct drbd_tconn { /* is a resource from the config file */ | |||
850 | 850 | ||
851 | struct crypto_hash *cram_hmac_tfm; | 851 | struct crypto_hash *cram_hmac_tfm; |
852 | struct crypto_hash *integrity_tfm; /* checksums we compute */ | 852 | struct crypto_hash *integrity_tfm; /* checksums we compute */ |
853 | struct crypto_hash *integrity_r_tfm; /* to be used by the receiver thread */ | 853 | struct crypto_hash *peer_integrity_tfm; /* checksums we verify */ |
854 | struct crypto_hash *csums_tfm; | 854 | struct crypto_hash *csums_tfm; |
855 | struct crypto_hash *verify_tfm; | 855 | struct crypto_hash *verify_tfm; |
856 | void *int_dig_in; | 856 | void *int_dig_in; |
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 986470537a64..747223539fd0 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c | |||
@@ -1405,8 +1405,8 @@ static int _drbd_send_ack(struct drbd_conf *mdev, enum drbd_packet cmd, | |||
1405 | void drbd_send_ack_dp(struct drbd_conf *mdev, enum drbd_packet cmd, | 1405 | void drbd_send_ack_dp(struct drbd_conf *mdev, enum drbd_packet cmd, |
1406 | struct p_data *dp, int data_size) | 1406 | struct p_data *dp, int data_size) |
1407 | { | 1407 | { |
1408 | data_size -= (mdev->tconn->agreed_pro_version >= 87 && mdev->tconn->integrity_r_tfm) ? | 1408 | data_size -= (mdev->tconn->agreed_pro_version >= 87 && mdev->tconn->peer_integrity_tfm) ? |
1409 | crypto_hash_digestsize(mdev->tconn->integrity_r_tfm) : 0; | 1409 | crypto_hash_digestsize(mdev->tconn->peer_integrity_tfm) : 0; |
1410 | _drbd_send_ack(mdev, cmd, dp->sector, cpu_to_be32(data_size), | 1410 | _drbd_send_ack(mdev, cmd, dp->sector, cpu_to_be32(data_size), |
1411 | dp->block_id); | 1411 | dp->block_id); |
1412 | } | 1412 | } |
@@ -2407,7 +2407,7 @@ void conn_free_crypto(struct drbd_tconn *tconn) | |||
2407 | crypto_free_hash(tconn->verify_tfm); | 2407 | crypto_free_hash(tconn->verify_tfm); |
2408 | crypto_free_hash(tconn->cram_hmac_tfm); | 2408 | crypto_free_hash(tconn->cram_hmac_tfm); |
2409 | crypto_free_hash(tconn->integrity_tfm); | 2409 | crypto_free_hash(tconn->integrity_tfm); |
2410 | crypto_free_hash(tconn->integrity_r_tfm); | 2410 | crypto_free_hash(tconn->peer_integrity_tfm); |
2411 | kfree(tconn->int_dig_in); | 2411 | kfree(tconn->int_dig_in); |
2412 | kfree(tconn->int_dig_vv); | 2412 | kfree(tconn->int_dig_vv); |
2413 | 2413 | ||
@@ -2415,7 +2415,7 @@ void conn_free_crypto(struct drbd_tconn *tconn) | |||
2415 | tconn->verify_tfm = NULL; | 2415 | tconn->verify_tfm = NULL; |
2416 | tconn->cram_hmac_tfm = NULL; | 2416 | tconn->cram_hmac_tfm = NULL; |
2417 | tconn->integrity_tfm = NULL; | 2417 | tconn->integrity_tfm = NULL; |
2418 | tconn->integrity_r_tfm = NULL; | 2418 | tconn->peer_integrity_tfm = NULL; |
2419 | tconn->int_dig_in = NULL; | 2419 | tconn->int_dig_in = NULL; |
2420 | tconn->int_dig_vv = NULL; | 2420 | tconn->int_dig_vv = NULL; |
2421 | } | 2421 | } |
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 9aa1a7b1b506..e84b1d755f07 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c | |||
@@ -1793,7 +1793,7 @@ struct crypto { | |||
1793 | struct crypto_hash *csums_tfm; | 1793 | struct crypto_hash *csums_tfm; |
1794 | struct crypto_hash *cram_hmac_tfm; | 1794 | struct crypto_hash *cram_hmac_tfm; |
1795 | struct crypto_hash *integrity_tfm; | 1795 | struct crypto_hash *integrity_tfm; |
1796 | struct crypto_hash *integrity_r_tfm; | 1796 | struct crypto_hash *peer_integrity_tfm; |
1797 | void *int_dig_in; | 1797 | void *int_dig_in; |
1798 | void *int_dig_vv; | 1798 | void *int_dig_vv; |
1799 | }; | 1799 | }; |
@@ -1835,7 +1835,7 @@ alloc_crypto(struct crypto *crypto, struct net_conf *new_conf) | |||
1835 | ERR_INTEGRITY_ALG, ERR_INTEGRITY_ALG_ND); | 1835 | ERR_INTEGRITY_ALG, ERR_INTEGRITY_ALG_ND); |
1836 | if (rv != NO_ERROR) | 1836 | if (rv != NO_ERROR) |
1837 | return rv; | 1837 | return rv; |
1838 | rv = alloc_tfm(&crypto->integrity_r_tfm, new_conf->integrity_alg, | 1838 | rv = alloc_tfm(&crypto->peer_integrity_tfm, new_conf->integrity_alg, |
1839 | ERR_INTEGRITY_ALG, ERR_INTEGRITY_ALG_ND); | 1839 | ERR_INTEGRITY_ALG, ERR_INTEGRITY_ALG_ND); |
1840 | if (rv != NO_ERROR) | 1840 | if (rv != NO_ERROR) |
1841 | return rv; | 1841 | return rv; |
@@ -1865,7 +1865,7 @@ static void free_crypto(struct crypto *crypto) | |||
1865 | kfree(crypto->int_dig_vv); | 1865 | kfree(crypto->int_dig_vv); |
1866 | crypto_free_hash(crypto->cram_hmac_tfm); | 1866 | crypto_free_hash(crypto->cram_hmac_tfm); |
1867 | crypto_free_hash(crypto->integrity_tfm); | 1867 | crypto_free_hash(crypto->integrity_tfm); |
1868 | crypto_free_hash(crypto->integrity_r_tfm); | 1868 | crypto_free_hash(crypto->peer_integrity_tfm); |
1869 | crypto_free_hash(crypto->csums_tfm); | 1869 | crypto_free_hash(crypto->csums_tfm); |
1870 | crypto_free_hash(crypto->verify_tfm); | 1870 | crypto_free_hash(crypto->verify_tfm); |
1871 | } | 1871 | } |
@@ -1958,8 +1958,8 @@ int drbd_adm_net_opts(struct sk_buff *skb, struct genl_info *info) | |||
1958 | tconn->int_dig_vv = crypto.int_dig_vv; | 1958 | tconn->int_dig_vv = crypto.int_dig_vv; |
1959 | crypto_free_hash(tconn->integrity_tfm); | 1959 | crypto_free_hash(tconn->integrity_tfm); |
1960 | tconn->integrity_tfm = crypto.integrity_tfm; | 1960 | tconn->integrity_tfm = crypto.integrity_tfm; |
1961 | crypto_free_hash(tconn->integrity_r_tfm); | 1961 | crypto_free_hash(tconn->peer_integrity_tfm); |
1962 | tconn->integrity_r_tfm = crypto.integrity_r_tfm; | 1962 | tconn->peer_integrity_tfm = crypto.peer_integrity_tfm; |
1963 | 1963 | ||
1964 | /* FIXME Changing cram_hmac while the connection is established is useless */ | 1964 | /* FIXME Changing cram_hmac while the connection is established is useless */ |
1965 | crypto_free_hash(tconn->cram_hmac_tfm); | 1965 | crypto_free_hash(tconn->cram_hmac_tfm); |
@@ -2084,7 +2084,7 @@ int drbd_adm_connect(struct sk_buff *skb, struct genl_info *info) | |||
2084 | tconn->int_dig_vv = crypto.int_dig_vv; | 2084 | tconn->int_dig_vv = crypto.int_dig_vv; |
2085 | tconn->cram_hmac_tfm = crypto.cram_hmac_tfm; | 2085 | tconn->cram_hmac_tfm = crypto.cram_hmac_tfm; |
2086 | tconn->integrity_tfm = crypto.integrity_tfm; | 2086 | tconn->integrity_tfm = crypto.integrity_tfm; |
2087 | tconn->integrity_r_tfm = crypto.integrity_r_tfm; | 2087 | tconn->peer_integrity_tfm = crypto.peer_integrity_tfm; |
2088 | tconn->csums_tfm = crypto.csums_tfm; | 2088 | tconn->csums_tfm = crypto.csums_tfm; |
2089 | tconn->verify_tfm = crypto.verify_tfm; | 2089 | tconn->verify_tfm = crypto.verify_tfm; |
2090 | 2090 | ||
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 98f03b143b38..36b846bcdda2 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c | |||
@@ -1384,8 +1384,8 @@ read_in_block(struct drbd_conf *mdev, u64 id, sector_t sector, | |||
1384 | void *dig_vv = mdev->tconn->int_dig_vv; | 1384 | void *dig_vv = mdev->tconn->int_dig_vv; |
1385 | unsigned long *data; | 1385 | unsigned long *data; |
1386 | 1386 | ||
1387 | dgs = (mdev->tconn->agreed_pro_version >= 87 && mdev->tconn->integrity_r_tfm) ? | 1387 | dgs = (mdev->tconn->agreed_pro_version >= 87 && mdev->tconn->peer_integrity_tfm) ? |
1388 | crypto_hash_digestsize(mdev->tconn->integrity_r_tfm) : 0; | 1388 | crypto_hash_digestsize(mdev->tconn->peer_integrity_tfm) : 0; |
1389 | 1389 | ||
1390 | if (dgs) { | 1390 | if (dgs) { |
1391 | /* | 1391 | /* |
@@ -1442,7 +1442,7 @@ read_in_block(struct drbd_conf *mdev, u64 id, sector_t sector, | |||
1442 | } | 1442 | } |
1443 | 1443 | ||
1444 | if (dgs) { | 1444 | if (dgs) { |
1445 | drbd_csum_ee(mdev, mdev->tconn->integrity_r_tfm, peer_req, dig_vv); | 1445 | drbd_csum_ee(mdev, mdev->tconn->peer_integrity_tfm, peer_req, dig_vv); |
1446 | if (memcmp(dig_in, dig_vv, dgs)) { | 1446 | if (memcmp(dig_in, dig_vv, dgs)) { |
1447 | dev_err(DEV, "Digest integrity check FAILED: %llus +%u\n", | 1447 | dev_err(DEV, "Digest integrity check FAILED: %llus +%u\n", |
1448 | (unsigned long long)sector, data_size); | 1448 | (unsigned long long)sector, data_size); |
@@ -1491,8 +1491,8 @@ static int recv_dless_read(struct drbd_conf *mdev, struct drbd_request *req, | |||
1491 | void *dig_in = mdev->tconn->int_dig_in; | 1491 | void *dig_in = mdev->tconn->int_dig_in; |
1492 | void *dig_vv = mdev->tconn->int_dig_vv; | 1492 | void *dig_vv = mdev->tconn->int_dig_vv; |
1493 | 1493 | ||
1494 | dgs = (mdev->tconn->agreed_pro_version >= 87 && mdev->tconn->integrity_r_tfm) ? | 1494 | dgs = (mdev->tconn->agreed_pro_version >= 87 && mdev->tconn->peer_integrity_tfm) ? |
1495 | crypto_hash_digestsize(mdev->tconn->integrity_r_tfm) : 0; | 1495 | crypto_hash_digestsize(mdev->tconn->peer_integrity_tfm) : 0; |
1496 | 1496 | ||
1497 | if (dgs) { | 1497 | if (dgs) { |
1498 | err = drbd_recv_all_warn(mdev->tconn, dig_in, dgs); | 1498 | err = drbd_recv_all_warn(mdev->tconn, dig_in, dgs); |
@@ -1520,7 +1520,7 @@ static int recv_dless_read(struct drbd_conf *mdev, struct drbd_request *req, | |||
1520 | } | 1520 | } |
1521 | 1521 | ||
1522 | if (dgs) { | 1522 | if (dgs) { |
1523 | drbd_csum_bio(mdev, mdev->tconn->integrity_r_tfm, bio, dig_vv); | 1523 | drbd_csum_bio(mdev, mdev->tconn->peer_integrity_tfm, bio, dig_vv); |
1524 | if (memcmp(dig_in, dig_vv, dgs)) { | 1524 | if (memcmp(dig_in, dig_vv, dgs)) { |
1525 | dev_err(DEV, "Digest integrity check FAILED. Broken NICs?\n"); | 1525 | dev_err(DEV, "Digest integrity check FAILED. Broken NICs?\n"); |
1526 | return -EINVAL; | 1526 | return -EINVAL; |