aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/drbd')
-rw-r--r--drivers/block/drbd/drbd_main.c4
-rw-r--r--drivers/block/drbd/drbd_receiver.c4
-rw-r--r--drivers/block/drbd/drbd_worker.c4
3 files changed, 7 insertions, 5 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 0358e55356c8..0c16620ecec5 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -2474,7 +2474,7 @@ int drbd_send_drequest_csum(struct drbd_conf *mdev,
2474 struct p_block_req p; 2474 struct p_block_req p;
2475 2475
2476 p.sector = cpu_to_be64(sector); 2476 p.sector = cpu_to_be64(sector);
2477 p.block_id = BE_DRBD_MAGIC + 0xbeef; 2477 p.block_id = ID_SYNCER /* unused */;
2478 p.blksize = cpu_to_be32(size); 2478 p.blksize = cpu_to_be32(size);
2479 2479
2480 p.head.magic = BE_DRBD_MAGIC; 2480 p.head.magic = BE_DRBD_MAGIC;
@@ -2497,7 +2497,7 @@ int drbd_send_ov_request(struct drbd_conf *mdev, sector_t sector, int size)
2497 struct p_block_req p; 2497 struct p_block_req p;
2498 2498
2499 p.sector = cpu_to_be64(sector); 2499 p.sector = cpu_to_be64(sector);
2500 p.block_id = BE_DRBD_MAGIC + 0xbabe; 2500 p.block_id = ID_SYNCER /* unused */;
2501 p.blksize = cpu_to_be32(size); 2501 p.blksize = cpu_to_be32(size);
2502 2502
2503 ok = drbd_send_cmd(mdev, USE_DATA_SOCKET, P_OV_REQUEST, 2503 ok = drbd_send_cmd(mdev, USE_DATA_SOCKET, P_OV_REQUEST,
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index d499aa6b7ac0..5ed96198538b 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -341,6 +341,10 @@ struct drbd_epoch_entry *drbd_alloc_ee(struct drbd_conf *mdev,
341 e->size = data_size; 341 e->size = data_size;
342 e->flags = 0; 342 e->flags = 0;
343 e->sector = sector; 343 e->sector = sector;
344 /*
345 * The block_id is opaque to the receiver. It is not endianness
346 * converted, and sent back to the sender unchanged.
347 */
344 e->block_id = id; 348 e->block_id = id;
345 349
346 return e; 350 return e;
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c
index 4d3e6f6213ba..10438c41f559 100644
--- a/drivers/block/drbd/drbd_worker.c
+++ b/drivers/block/drbd/drbd_worker.c
@@ -305,8 +305,6 @@ int w_e_send_csum(struct drbd_conf *mdev, struct drbd_work *w, int cancel)
305 void *digest; 305 void *digest;
306 int ok = 1; 306 int ok = 1;
307 307
308 D_ASSERT(e->block_id == DRBD_MAGIC + 0xbeef);
309
310 if (unlikely(cancel)) 308 if (unlikely(cancel))
311 goto out; 309 goto out;
312 310
@@ -359,7 +357,7 @@ static int read_for_csum(struct drbd_conf *mdev, sector_t sector, int size)
359 357
360 /* GFP_TRY, because if there is no memory available right now, this may 358 /* GFP_TRY, because if there is no memory available right now, this may
361 * be rescheduled for later. It is "only" background resync, after all. */ 359 * be rescheduled for later. It is "only" background resync, after all. */
362 e = drbd_alloc_ee(mdev, DRBD_MAGIC+0xbeef, sector, size, GFP_TRY); 360 e = drbd_alloc_ee(mdev, ID_SYNCER /* unused */, sector, size, GFP_TRY);
363 if (!e) 361 if (!e)
364 goto defer; 362 goto defer;
365 363