From: "zhengbing.huang" <zhengbing.huang@easystack.cn>
To: drbd-dev@lists.linbit.com
Subject: [PATCH] drbd: Fix seq_num numeric conversion error
Date: Tue, 22 Oct 2024 19:41:51 +0800 [thread overview]
Message-ID: <20241022114151.8050-1-zhengbing.huang@easystack.cn> (raw)
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
next reply other threads:[~2024-10-22 11:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-22 11:41 zhengbing.huang [this message]
2024-10-24 11:33 ` [PATCH] drbd: Fix seq_num numeric conversion error Joel Colledge
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=20241022114151.8050-1-zhengbing.huang@easystack.cn \
--to=zhengbing.huang@easystack.cn \
--cc=drbd-dev@lists.linbit.com \
/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