All of lore.kernel.org
 help / color / mirror / Atom feed
From: xiubli@redhat.com
To: ceph-devel@vger.kernel.org
Cc: idryomov@gmail.com, jlayton@kernel.org, vshankar@redhat.com,
	mchangir@redhat.com, Xiubo Li <xiubli@redhat.com>
Subject: [PATCH v3 0/3] libceph: fix sparse-read failure bug
Date: Fri, 15 Dec 2023 08:20:31 +0800	[thread overview]
Message-ID: <20231215002034.205780-1-xiubli@redhat.com> (raw)

From: Xiubo Li <xiubli@redhat.com>

The debug logs:

2725523 <7>[ 8771.114348] libceph:  [0] got 1 extents
2725524 <7>[ 8771.114353] libceph:  [0] ext 0 off 0x66000 len 0x4000
2725525 <7>[ 8771.114370] libceph:  prep_next_sparse_read: [0] completed extent array len 1 cursor->resid 0
2725526 <7>[ 8771.114374] libceph:  read_partial have 0, left 21, con->v1.in_base_pos 53
2725527 <7>[ 8771.114379] libceph:  read_partial have 14, left 7, con->v1.in_base_pos 67         ====> there were still 7 bytes not received
2725528 <7>[ 8771.114382] libceph:  read_partial return 0
2725529 <7>[ 8771.114384] libceph:  try_read done on 0000000094d53202 ret 0
2725530 <7>[ 8771.114387] libceph:  try_write start 0000000094d53202 state 12
2725531 <7>[ 8771.114389] libceph:  try_write out_kvec_bytes 0
2725532 <7>[ 8771.114391] libceph:  try_write nothing else to write.
2725533 <7>[ 8771.114393] libceph:  try_write done on 0000000094d53202 ret 0
2725534 <7>[ 8771.114396] libceph:  put_osd 000000009b11f20c 5 -> 4
2725535 <7>[ 8771.114450] libceph:  ceph_sock_data_ready 0000000094d53202 state = 12, queueing work
2725536 <7>[ 8771.114454] libceph:  get_osd 000000009b11f20c 4 -> 5
2725537 <7>[ 8771.114457] libceph:  queue_con_delay 0000000094d53202 0
2725538 <7>[ 8771.114651] libceph:  try_read start 0000000094d53202 state 12
2725539 <7>[ 8771.114655] libceph:  try_read tag 7 in_base_pos 67
2725540 <7>[ 8771.114657] libceph:  read_partial_message con 0000000094d53202 msg 0000000060b8a473
2725541 <7>[ 8771.114660] libceph:  read_partial return 1
2725542 <7>[ 8771.114663] libceph:  read_partial have 14, left 7, con->v1.in_base_pos 67         ====> the rest 7 bytes came
2725543 <7>[ 8771.114669] libceph:  read_partial return 1
2725544 <7>[ 8771.114671] libceph:  read_partial_message got msg 0000000060b8a473 164 (4271800174) + 0 (0) + 16408 (2739232014)
2725545 <7>[ 8771.114677] libceph:  ===== 0000000060b8a473 73 from osd0 43=osd_opreply len 164+0+16408 (4271800174 0 2739232014) =====
2725546 <7>[ 8771.114683] libceph:  handle_reply msg 0000000060b8a473 tid 99
2725547 <7>[ 8771.114687] libceph:  handle_reply req 000000006ba179f6 tid 99 flags 0x400015 pgid 3.2b epoch 53 attempt 0 v 0'0 uv 5984
2725548 <7>[ 8771.114693] libceph:   req 000000006ba179f6 tid 99 op 0 rval 0 len 16408
2725549 <7>[ 8771.114697] libceph:  handle_reply req 000000006ba179f6 tid 99 result 0 data_len 16408
2725550 <7>[ 8771.114701] libceph:  finish_request req 000000006ba179f6 tid 99                   ====> the request was successfully finished



V3:
- rename read_sparse_msg_XX to read_partial_sparse_msg_XX
- fix the sparse-read bug in the messager v1 code.

V2:
- fix the sparse-read bug in the sparse-read code instead


Xiubo Li (3):
  libceph: fail the sparse-read if there still has data in socket
  libceph: rename read_sparse_msg_XX to read_partial_sparse_msg_XX
  libceph: just wait for more data to be available on the socket

 include/linux/ceph/messenger.h |  2 ++
 net/ceph/messenger.c           |  1 +
 net/ceph/messenger_v1.c        | 29 ++++++++++++++++++++---------
 net/ceph/osd_client.c          |  5 ++++-
 4 files changed, 27 insertions(+), 10 deletions(-)

-- 
2.43.0


             reply	other threads:[~2023-12-15  0:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-15  0:20 xiubli [this message]
2023-12-15  0:20 ` [PATCH v3 1/3] libceph: fail the sparse-read if there still has data in socket xiubli
2023-12-15 17:06   ` Jeff Layton
2023-12-18  1:23     ` Xiubo Li
2023-12-15  0:20 ` [PATCH v3 2/3] libceph: rename read_sparse_msg_XX to read_partial_sparse_msg_XX xiubli
2023-12-15  0:20 ` [PATCH v3 3/3] libceph: just wait for more data to be available on the socket xiubli
2024-01-15 22:38   ` Ilya Dryomov
     [not found]     ` <a1d6e998-f496-4408-9d76-3671ee73e054@redhat.com>
2024-01-16 10:00       ` Ilya Dryomov
     [not found]         ` <35849fda-29b2-47ad-bf49-f2715efc7b8c@redhat.com>
2024-01-16 12:06           ` Ilya Dryomov
     [not found]         ` <68e4cf5a-f64f-4545-87b0-762ab920d9ba@redhat.com>
2024-01-22 19:13           ` Ilya Dryomov
2024-01-22 21:26             ` Ilya Dryomov

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=20231215002034.205780-1-xiubli@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.