CEPH-Devel archive mirror
 help / color / mirror / Atom feed
From: Xiubo Li <xiubli@redhat.com>
To: Jeff Layton <jlayton@kernel.org>, Ilya Dryomov <idryomov@gmail.com>
Cc: ceph-devel@vger.kernel.org, vshankar@redhat.com, mchangir@redhat.com
Subject: Re: [PATCH v3 2/2] libceph: check the data length when sparse-read finishes
Date: Mon, 6 Nov 2023 21:01:28 +0800	[thread overview]
Message-ID: <c3efdf13-89b6-bcff-2ac4-7bb4681862a2@redhat.com> (raw)
In-Reply-To: <85fd22f7f3b3c18cbb9a1edf5894300faca0f2fa.camel@kernel.org>


On 11/6/23 20:32, Jeff Layton wrote:
> On Mon, 2023-11-06 at 20:17 +0800, Xiubo Li wrote:
>> On 11/6/23 19:54, Ilya Dryomov wrote:
>>> On Mon, Nov 6, 2023 at 2:19 AM <xiubli@redhat.com> wrote:
>>>> From: Xiubo Li <xiubli@redhat.com>
>>>>
>>>> For sparse reading the real length of the data should equal to the
>>>> total length from the extent array.
>>>>
>>>> URL: https://tracker.ceph.com/issues/62081
>>>> Signed-off-by: Xiubo Li <xiubli@redhat.com>
>>>> Reviewed-by: Jeff Layton <jlayton@kernel.org>
>>>> ---
>>>>    net/ceph/osd_client.c | 8 ++++++++
>>>>    1 file changed, 8 insertions(+)
>>>>
>>>> diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
>>>> index 0e629dfd55ee..050dc39065fb 100644
>>>> --- a/net/ceph/osd_client.c
>>>> +++ b/net/ceph/osd_client.c
>>>> @@ -5920,6 +5920,12 @@ static int osd_sparse_read(struct ceph_connection *con,
>>>>                   fallthrough;
>>>>           case CEPH_SPARSE_READ_DATA:
>>>>                   if (sr->sr_index >= count) {
>>>> +                       if (sr->sr_datalen && count) {
>>>> +                               pr_warn_ratelimited("%s: datalen and extents mismath, %d left\n",
>>>> +                                                   __func__, sr->sr_datalen);
>>>> +                               return -EREMOTEIO;
>>> By returning EREMOTEIO here you have significantly changed the
>>> semantics (in v2 it was just a warning) but Jeff's Reviewed-by is
>>> retained.  Has he acked the change?
>> Oh, sorry I forgot to remove that.
>>
>> Jeff, Please take a look here again.
>>
>> Thanks
>>
>> - Xiubo
>>
>>
> Returning EREMOTEIO if the lengths don't match seems like a reasonable
> thing to do. You can retain the R-b.
>
Thanks Jeff.

- Xiubo


      reply	other threads:[~2023-11-06 13:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-06  1:16 [PATCH v3 0/2] libceph: sparse-read misc fixes xiubli
2023-11-06  1:16 ` [PATCH v3 1/2] libceph: save and covert sr_datalen to host-endian xiubli
2023-11-06  1:16 ` [PATCH v3 2/2] libceph: check the data length when sparse-read finishes xiubli
2023-11-06 11:54   ` Ilya Dryomov
2023-11-06 12:17     ` Xiubo Li
2023-11-06 12:32       ` Jeff Layton
2023-11-06 13:01         ` Xiubo Li [this message]

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=c3efdf13-89b6-bcff-2ac4-7bb4681862a2@redhat.com \
    --to=xiubli@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=jlayton@kernel.org \
    --cc=mchangir@redhat.com \
    --cc=vshankar@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).