Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
* [PATCH] drbd: Fix seq_num numeric conversion error
@ 2024-10-22 11:41 zhengbing.huang
  2024-10-24 11:33 ` Joel Colledge
  0 siblings, 1 reply; 2+ messages in thread
From: zhengbing.huang @ 2024-10-22 11:41 UTC (permalink / raw)
  To: drbd-dev

seq_num is a 32-bit value and should not be converted with be64_to_cpu().

Signed-off-by: zhengbing.huang <zhengbing.huang@easystack.cn>
---
 drbd/drbd_receiver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drbd/drbd_receiver.c b/drbd/drbd_receiver.c
index 4f0670f42..4d3ab28b3 100644
--- a/drbd/drbd_receiver.c
+++ b/drbd/drbd_receiver.c
@@ -2217,7 +2217,7 @@ static void p_req_detail_from_pi(struct drbd_connection *connection,
 
 	d->sector = be64_to_cpu(p->p_data.sector);
 	d->block_id = p->p_data.block_id;
-	d->peer_seq = be64_to_cpu(p->p_data.seq_num);
+	d->peer_seq = be32_to_cpu(p->p_data.seq_num);
 	d->dp_flags = be32_to_cpu(p->p_data.dp_flags);
 	d->length = pi->size;
 	d->bi_size = is_trim_or_zeroes ? be32_to_cpu(p->size) : pi->size - digest_size;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-10-24 11:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-22 11:41 [PATCH] drbd: Fix seq_num numeric conversion error zhengbing.huang
2024-10-24 11:33 ` Joel Colledge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox