Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346067
b: refs/heads/master
c: 46e1ce4
h: refs/heads/master
i:
  346065: b62bd24
  346063: b651c91
v: v3
  • Loading branch information
Philipp Reisner committed Nov 8, 2012
1 parent 371e643 commit 3560614
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dcb20d1a8e7d9602e52a9b673ae4d7f746d2cbb2
refs/heads/master: 46e1ce4177aac86b8e39bc7bb5763e9d040ae5cb
2 changes: 1 addition & 1 deletion trunk/drivers/block/drbd/drbd_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ struct drbd_tconn { /* is a resource from the config file */
struct list_head out_of_sequence_requests;

struct crypto_hash *cram_hmac_tfm;
struct crypto_hash *integrity_tfm; /* checksums we compute */
struct crypto_hash *integrity_tfm; /* checksums we compute, updates protected by tconn->data->mutex */
struct crypto_hash *peer_integrity_tfm; /* checksums we verify */
struct crypto_hash *csums_tfm;
struct crypto_hash *verify_tfm;
Expand Down
9 changes: 5 additions & 4 deletions trunk/drivers/block/drbd/drbd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1720,11 +1720,11 @@ int drbd_send_dblock(struct drbd_conf *mdev, struct drbd_request *req)
int dgs;
int err;

sock = &mdev->tconn->data;
p = drbd_prepare_command(mdev, sock);
dgs = (mdev->tconn->agreed_pro_version >= 87 && mdev->tconn->integrity_tfm) ?
crypto_hash_digestsize(mdev->tconn->integrity_tfm) : 0;

sock = &mdev->tconn->data;
p = drbd_prepare_command(mdev, sock);
if (!p)
return -EIO;
p->sector = cpu_to_be64(req->i.sector);
Expand Down Expand Up @@ -1793,11 +1793,12 @@ int drbd_send_block(struct drbd_conf *mdev, enum drbd_packet cmd,
int err;
int dgs;

sock = &mdev->tconn->data;
p = drbd_prepare_command(mdev, sock);

dgs = (mdev->tconn->agreed_pro_version >= 87 && mdev->tconn->integrity_tfm) ?
crypto_hash_digestsize(mdev->tconn->integrity_tfm) : 0;

sock = &mdev->tconn->data;
p = drbd_prepare_command(mdev, sock);
if (!p)
return -EIO;
p->sector = cpu_to_be64(peer_req->i.sector);
Expand Down

0 comments on commit 3560614

Please sign in to comment.