From: Philipp Reisner <philipp.reisner@linbit.com>
To: linux-kernel@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Cc: drbd-dev@lists.linbit.com
Subject: [PATCH 08/16] drbd: Rename integrity_r_tfm -> peer_integrity_tfm
Date: Wed, 5 Oct 2011 11:37:56 +0200 [thread overview]
Message-ID: <1317807484-24628-9-git-send-email-philipp.reisner@linbit.com> (raw)
In-Reply-To: <1317807484-24628-1-git-send-email-philipp.reisner@linbit.com>
From: Andreas Gruenbacher <agruen@linbit.com>
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
---
drivers/block/drbd/drbd_int.h | 2 +-
drivers/block/drbd/drbd_main.c | 8 ++++----
drivers/block/drbd/drbd_nl.c | 12 ++++++------
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 4787c790..e6e4f4e 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 */
struct crypto_hash *cram_hmac_tfm;
struct crypto_hash *integrity_tfm; /* checksums we compute */
- struct crypto_hash *integrity_r_tfm; /* to be used by the receiver thread */
+ struct crypto_hash *peer_integrity_tfm; /* checksums we verify */
struct crypto_hash *csums_tfm;
struct crypto_hash *verify_tfm;
void *int_dig_in;
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 30dd8a9..417c437 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,
void drbd_send_ack_dp(struct drbd_conf *mdev, enum drbd_packet cmd,
struct p_data *dp, int data_size)
{
- data_size -= (mdev->tconn->agreed_pro_version >= 87 && mdev->tconn->integrity_r_tfm) ?
- crypto_hash_digestsize(mdev->tconn->integrity_r_tfm) : 0;
+ data_size -= (mdev->tconn->agreed_pro_version >= 87 && mdev->tconn->peer_integrity_tfm) ?
+ crypto_hash_digestsize(mdev->tconn->peer_integrity_tfm) : 0;
_drbd_send_ack(mdev, cmd, dp->sector, cpu_to_be32(data_size),
dp->block_id);
}
@@ -2407,7 +2407,7 @@ void conn_free_crypto(struct drbd_tconn *tconn)
crypto_free_hash(tconn->verify_tfm);
crypto_free_hash(tconn->cram_hmac_tfm);
crypto_free_hash(tconn->integrity_tfm);
- crypto_free_hash(tconn->integrity_r_tfm);
+ crypto_free_hash(tconn->peer_integrity_tfm);
kfree(tconn->int_dig_in);
kfree(tconn->int_dig_vv);
@@ -2415,7 +2415,7 @@ void conn_free_crypto(struct drbd_tconn *tconn)
tconn->verify_tfm = NULL;
tconn->cram_hmac_tfm = NULL;
tconn->integrity_tfm = NULL;
- tconn->integrity_r_tfm = NULL;
+ tconn->peer_integrity_tfm = NULL;
tconn->int_dig_in = NULL;
tconn->int_dig_vv = NULL;
}
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index d24d96d..efae733 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -1824,7 +1824,7 @@ struct crypto {
struct crypto_hash *csums_tfm;
struct crypto_hash *cram_hmac_tfm;
struct crypto_hash *integrity_tfm;
- struct crypto_hash *integrity_r_tfm;
+ struct crypto_hash *peer_integrity_tfm;
void *int_dig_in;
void *int_dig_vv;
};
@@ -1866,7 +1866,7 @@ alloc_crypto(struct crypto *crypto, struct net_conf *new_conf)
ERR_INTEGRITY_ALG, ERR_INTEGRITY_ALG_ND);
if (rv != NO_ERROR)
return rv;
- rv = alloc_tfm(&crypto->integrity_r_tfm, new_conf->integrity_alg,
+ rv = alloc_tfm(&crypto->peer_integrity_tfm, new_conf->integrity_alg,
ERR_INTEGRITY_ALG, ERR_INTEGRITY_ALG_ND);
if (rv != NO_ERROR)
return rv;
@@ -1896,7 +1896,7 @@ static void free_crypto(struct crypto *crypto)
kfree(crypto->int_dig_vv);
crypto_free_hash(crypto->cram_hmac_tfm);
crypto_free_hash(crypto->integrity_tfm);
- crypto_free_hash(crypto->integrity_r_tfm);
+ crypto_free_hash(crypto->peer_integrity_tfm);
crypto_free_hash(crypto->csums_tfm);
crypto_free_hash(crypto->verify_tfm);
}
@@ -2003,8 +2003,8 @@ int drbd_adm_net_opts(struct sk_buff *skb, struct genl_info *info)
tconn->int_dig_vv = crypto.int_dig_vv;
crypto_free_hash(tconn->integrity_tfm);
tconn->integrity_tfm = crypto.integrity_tfm;
- crypto_free_hash(tconn->integrity_r_tfm);
- tconn->integrity_r_tfm = crypto.integrity_r_tfm;
+ crypto_free_hash(tconn->peer_integrity_tfm);
+ tconn->peer_integrity_tfm = crypto.peer_integrity_tfm;
/* FIXME Changing cram_hmac while the connection is established is useless */
crypto_free_hash(tconn->cram_hmac_tfm);
@@ -2129,7 +2129,7 @@ int drbd_adm_connect(struct sk_buff *skb, struct genl_info *info)
tconn->int_dig_vv = crypto.int_dig_vv;
tconn->cram_hmac_tfm = crypto.cram_hmac_tfm;
tconn->integrity_tfm = crypto.integrity_tfm;
- tconn->integrity_r_tfm = crypto.integrity_r_tfm;
+ tconn->peer_integrity_tfm = crypto.peer_integrity_tfm;
tconn->csums_tfm = crypto.csums_tfm;
tconn->verify_tfm = crypto.verify_tfm;
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 98f03b1..36b846b 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,
void *dig_vv = mdev->tconn->int_dig_vv;
unsigned long *data;
- dgs = (mdev->tconn->agreed_pro_version >= 87 && mdev->tconn->integrity_r_tfm) ?
- crypto_hash_digestsize(mdev->tconn->integrity_r_tfm) : 0;
+ dgs = (mdev->tconn->agreed_pro_version >= 87 && mdev->tconn->peer_integrity_tfm) ?
+ crypto_hash_digestsize(mdev->tconn->peer_integrity_tfm) : 0;
if (dgs) {
/*
@@ -1442,7 +1442,7 @@ read_in_block(struct drbd_conf *mdev, u64 id, sector_t sector,
}
if (dgs) {
- drbd_csum_ee(mdev, mdev->tconn->integrity_r_tfm, peer_req, dig_vv);
+ drbd_csum_ee(mdev, mdev->tconn->peer_integrity_tfm, peer_req, dig_vv);
if (memcmp(dig_in, dig_vv, dgs)) {
dev_err(DEV, "Digest integrity check FAILED: %llus +%u\n",
(unsigned long long)sector, data_size);
@@ -1491,8 +1491,8 @@ static int recv_dless_read(struct drbd_conf *mdev, struct drbd_request *req,
void *dig_in = mdev->tconn->int_dig_in;
void *dig_vv = mdev->tconn->int_dig_vv;
- dgs = (mdev->tconn->agreed_pro_version >= 87 && mdev->tconn->integrity_r_tfm) ?
- crypto_hash_digestsize(mdev->tconn->integrity_r_tfm) : 0;
+ dgs = (mdev->tconn->agreed_pro_version >= 87 && mdev->tconn->peer_integrity_tfm) ?
+ crypto_hash_digestsize(mdev->tconn->peer_integrity_tfm) : 0;
if (dgs) {
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,
}
if (dgs) {
- drbd_csum_bio(mdev, mdev->tconn->integrity_r_tfm, bio, dig_vv);
+ drbd_csum_bio(mdev, mdev->tconn->peer_integrity_tfm, bio, dig_vv);
if (memcmp(dig_in, dig_vv, dgs)) {
dev_err(DEV, "Digest integrity check FAILED. Broken NICs?\n");
return -EINVAL;
--
1.7.4.1
next prev parent reply other threads:[~2011-10-05 9:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-05 9:37 [RFC 00/16] drbd: part 14 of adding multiple volume support to drbd Philipp Reisner
2011-10-05 9:37 ` [PATCH 01/16] drbd: Consider all crypto options in connect and in net-options Philipp Reisner
2011-10-05 9:37 ` [PATCH 02/16] drbd: on reconfiguration requests, mind the SET_DEFAULTS flag Philipp Reisner
2011-10-05 9:37 ` [PATCH 03/16] drbd: rename variable ndc to new_disk_conf Philipp Reisner
2011-10-05 9:37 ` [PATCH 04/16] drbd: rename variable sc to res_opts Philipp Reisner
2011-10-05 9:37 ` [PATCH 05/16] drbd: fix copy/paste error in comment Philipp Reisner
2011-10-05 9:37 ` [PATCH 06/16] drbd: Wrong use of RCU in receive_protocol() Philipp Reisner
2011-10-05 9:37 ` [PATCH 07/16] drbd: Rename integrity_w_tfm -> integrity_tfm Philipp Reisner
2011-10-05 9:37 ` Philipp Reisner [this message]
2011-10-05 9:37 ` [PATCH 09/16] drbd: Remove obsolete drbd_crypto_is_hash() Philipp Reisner
2011-10-05 9:37 ` [PATCH 10/16] drbd: Introduce a "lockless" variant of drbd_send_protocoll() Philipp Reisner
2011-10-05 9:37 ` [PATCH 11/16] drbd: Allow to change data-integrity-alg on the fly Philipp Reisner
2011-10-05 9:38 ` [PATCH 12/16] drbd: fix race when forcefully disconnecting Philipp Reisner
2011-10-05 9:38 ` [PATCH 13/16] drbd: fix thread stop deadlock Philipp Reisner
2011-10-05 9:38 ` [PATCH 14/16] drbd: fix schedule in atomic Philipp Reisner
2011-10-05 9:38 ` [PATCH 15/16] drbd: Remove left-over unused define Philipp Reisner
2011-10-05 9:38 ` [PATCH 16/16] drbd: Generate the drbd_set_*_defaults() functions from drbd_genl.h Philipp Reisner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1317807484-24628-9-git-send-email-philipp.reisner@linbit.com \
--to=philipp.reisner@linbit.com \
--cc=axboe@kernel.dk \
--cc=drbd-dev@lists.linbit.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®