From: Jeff Layton <jlayton@kernel.org>
To: xiubli@redhat.com, ceph-devel@vger.kernel.org
Cc: idryomov@gmail.com, vshankar@redhat.com, mchangir@redhat.com
Subject: Re: [PATCH v4 2/3] libceph: rename read_sparse_msg_XX to read_partial_sparse_msg_XX
Date: Thu, 18 Jan 2024 09:04:26 -0500 [thread overview]
Message-ID: <3a73f89720d7981bd07d6c25cb47764130fb5edd.camel@kernel.org> (raw)
In-Reply-To: <20240118105047.792879-3-xiubli@redhat.com>
On Thu, 2024-01-18 at 18:50 +0800, xiubli@redhat.com wrote:
> From: Xiubo Li <xiubli@redhat.com>
>
> Actually the read_sparse_msg_XX functions allow to continue reading
> and parsing the socket buffer when handling of short receives.
>
> Just rename it with _partial_ prefixed.
>
> URL: https://tracker.ceph.com/issues/63586
> Signed-off-by: Xiubo Li <xiubli@redhat.com>
> ---
> net/ceph/messenger_v1.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/net/ceph/messenger_v1.c b/net/ceph/messenger_v1.c
> index f9a50d7f0d20..4cb60bacf5f5 100644
> --- a/net/ceph/messenger_v1.c
> +++ b/net/ceph/messenger_v1.c
> @@ -991,7 +991,7 @@ static inline int read_partial_message_section(struct ceph_connection *con,
> return read_partial_message_chunk(con, section, sec_len, crc);
> }
>
> -static int read_sparse_msg_extent(struct ceph_connection *con, u32 *crc)
> +static int read_partial_sparse_msg_extent(struct ceph_connection *con, u32 *crc)
> {
> struct ceph_msg_data_cursor *cursor = &con->in_msg->cursor;
> bool do_bounce = ceph_test_opt(from_msgr(con->msgr), RXBOUNCE);
> @@ -1026,7 +1026,7 @@ static int read_sparse_msg_extent(struct ceph_connection *con, u32 *crc)
> return 1;
> }
>
> -static int read_sparse_msg_data(struct ceph_connection *con)
> +static int read_partial_sparse_msg_data(struct ceph_connection *con)
> {
> struct ceph_msg_data_cursor *cursor = &con->in_msg->cursor;
> bool do_datacrc = !ceph_test_opt(from_msgr(con->msgr), NOCRC);
> @@ -1043,7 +1043,7 @@ static int read_sparse_msg_data(struct ceph_connection *con)
> con->v1.in_sr_len,
> &crc);
> else if (cursor->sr_resid > 0)
> - ret = read_sparse_msg_extent(con, &crc);
> + ret = read_partial_sparse_msg_extent(con, &crc);
>
> if (ret <= 0) {
> if (do_datacrc)
> @@ -1254,7 +1254,7 @@ static int read_partial_message(struct ceph_connection *con)
> return -EIO;
>
> if (m->sparse_read)
> - ret = read_sparse_msg_data(con);
> + ret = read_partial_sparse_msg_data(con);
> else if (ceph_test_opt(from_msgr(con->msgr), RXBOUNCE))
> ret = read_partial_msg_data_bounce(con);
> else
Meh. I'm not sure this makes things any more clear, but OK:
Acked-by: Jeff Layton <jlayton@kernel.org>
next prev parent reply other threads:[~2024-01-18 14:04 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-18 10:50 [PATCH v4 0/3] libceph: fix sparse-read failure bug xiubli
2024-01-18 10:50 ` [PATCH v4 1/3] libceph: fail the sparse-read if there still has data in socket xiubli
2024-01-18 14:03 ` Jeff Layton
2024-01-19 4:07 ` Xiubo Li
2024-01-19 11:03 ` Jeff Layton
2024-01-22 3:17 ` Xiubo Li
2024-01-18 10:50 ` [PATCH v4 2/3] libceph: rename read_sparse_msg_XX to read_partial_sparse_msg_XX xiubli
2024-01-18 14:04 ` Jeff Layton [this message]
2024-01-18 10:50 ` [PATCH v4 3/3] libceph: just wait for more data to be available on the socket xiubli
2024-01-18 14:36 ` Jeff Layton
2024-01-18 18:24 ` Jeff Layton
2024-01-19 4:35 ` Xiubo Li
2024-01-19 11:09 ` Jeff Layton
2024-01-22 2:52 ` Xiubo Li
2024-01-22 11:44 ` Jeff Layton
2024-01-22 15:02 ` Jeff Layton
2024-01-22 16:55 ` Ilya Dryomov
2024-01-22 17:14 ` Jeff Layton
2024-01-22 19:41 ` Ilya Dryomov
2024-01-23 0:53 ` Xiubo Li
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=3a73f89720d7981bd07d6c25cb47764130fb5edd.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=ceph-devel@vger.kernel.org \
--cc=idryomov@gmail.com \
--cc=mchangir@redhat.com \
--cc=vshankar@redhat.com \
--cc=xiubli@redhat.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