public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Luis Henriques <lhenriques@suse.de>
To: xiubli@redhat.com
Cc: ceph-devel@vger.kernel.org,  idryomov@gmail.com,
	 jlayton@kernel.org, vshankar@redhat.com,  mchangir@redhat.com,
	 stable@vger.kernel.org
Subject: Re: [PATCH v2] libceph: init the cursor when preparing the sparse read
Date: Wed, 06 Mar 2024 11:24:32 +0000	[thread overview]
Message-ID: <87msrbr4b3.fsf@suse.de> (raw)
In-Reply-To: <20240306010544.182527-1-xiubli@redhat.com> (xiubli@redhat.com's message of "Wed, 6 Mar 2024 09:05:44 +0800")

xiubli@redhat.com writes:

> From: Xiubo Li <xiubli@redhat.com>
>
> The osd code has remove cursor initilizing code and this will make
> the sparse read state into a infinite loop. We should initialize
> the cursor just before each sparse-read in messnger v2.
>
> Cc: stable@vger.kernel.org
> URL: https://tracker.ceph.com/issues/64607
> Fixes: 8e46a2d068c9 ("libceph: just wait for more data to be available on the socket")
> Reported-by: Luis Henriques <lhenriques@suse.de>
> Signed-off-by: Xiubo Li <xiubli@redhat.com>
> ---
>
> V2:
> - Just removed the unnecessary 'sparse_read_total' check.
>

Thanks a lot for the quick fix, Xiubo.  FWIW:

Tested-by: Luis Henriques <lhenriques@suse.de>

Note that I still see this test failing occasionally, but I haven't had
time to help debugging it.  And that's a different issue, of course.  TBH
I don't remember if this test ever used to reliably pass.  Here's the
output diff shown by fstests in case you're not able to reproduce it:

@@ -65,7 +65,7 @@
 # Getting encryption key status
 Present (user_count=1, added_by_self)
 # Removing encryption key
-Removed encryption key with identifier 69b2f6edeee720cce0577937eb8a6751
+Removed encryption key with identifier 69b2f6edeee720cce0577937eb8a6751, but files still busy
 # Getting encryption key status
 Absent
 # Verifying that the encrypted directory was "locked"

Cheers,
-- 
Luís

>
> net/ceph/messenger_v2.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/net/ceph/messenger_v2.c b/net/ceph/messenger_v2.c
> index a0ca5414b333..ab3ab130a911 100644
> --- a/net/ceph/messenger_v2.c
> +++ b/net/ceph/messenger_v2.c
> @@ -2034,6 +2034,9 @@ static int prepare_sparse_read_data(struct ceph_connection *con)
>  	if (!con_secure(con))
>  		con->in_data_crc = -1;
>  
> +	ceph_msg_data_cursor_init(&con->v2.in_cursor, con->in_msg,
> +				  con->in_msg->sparse_read_total);
> +
>  	reset_in_kvecs(con);
>  	con->v2.in_state = IN_S_PREPARE_SPARSE_DATA_CONT;
>  	con->v2.data_len_remain = data_len(msg);
> -- 
>
> 2.43.0
>


  reply	other threads:[~2024-03-06 11:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-06  1:05 [PATCH v2] libceph: init the cursor when preparing the sparse read xiubli
2024-03-06 11:24 ` Luis Henriques [this message]
2024-03-06 14:13   ` Ilya Dryomov
2024-03-07  1:19   ` 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=87msrbr4b3.fsf@suse.de \
    --to=lhenriques@suse.de \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=jlayton@kernel.org \
    --cc=mchangir@redhat.com \
    --cc=stable@vger.kernel.org \
    --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