CEPH filesystem development
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Xiubo Li <xiubli@redhat.com>, idryomov@gmail.com
Cc: ceph-devel@vger.kernel.org
Subject: Re: [PATCH v3 2/5] libceph: define struct ceph_sparse_extent and add some helpers
Date: Mon, 21 Mar 2022 06:02:00 -0400	[thread overview]
Message-ID: <b50f3fb513fc4c38d0255179ae53b02a66778301.camel@kernel.org> (raw)
In-Reply-To: <6895739a-8d02-3d04-f5ac-e0c50cea5f06@redhat.com>

On Mon, 2022-03-21 at 15:57 +0800, Xiubo Li wrote:
> On 3/18/22 9:50 PM, Jeff Layton wrote:
> > When the OSD sends back a sparse read reply, it contains an array of
> > these structures. Define the structure and add a couple of helpers for
> > dealing with them.
> > 
> > Also add a place in struct ceph_osd_req_op to store the extent buffer,
> > and code to free it if it's populated when the req is torn down.
> > 
> > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> > ---
> >   include/linux/ceph/osd_client.h | 31 ++++++++++++++++++++++++++++++-
> >   net/ceph/osd_client.c           | 13 +++++++++++++
> >   2 files changed, 43 insertions(+), 1 deletion(-)
> > 
> > diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h
> > index 3122c1a3205f..00a5b53a6763 100644
> > --- a/include/linux/ceph/osd_client.h
> > +++ b/include/linux/ceph/osd_client.h
> > @@ -29,6 +29,17 @@ typedef void (*ceph_osdc_callback_t)(struct ceph_osd_request *);
> >   
> >   #define CEPH_HOMELESS_OSD	-1
> >   
> > +/*
> > + * A single extent in a SPARSE_READ reply.
> > + *
> > + * Note that these come from the OSD as little-endian values. On BE arches,
> > + * we convert them in-place after receipt.
> > + */
> > +struct ceph_sparse_extent {
> > +	u64	off;
> > +	u64	len;
> > +} __attribute__((packed));
> > +
> >   /*
> >    * A given osd we're communicating with.
> >    *
> > @@ -104,6 +115,8 @@ struct ceph_osd_req_op {
> >   			u64 offset, length;
> >   			u64 truncate_size;
> >   			u32 truncate_seq;
> > +			int sparse_ext_len;
> 
> To be more readable, how about
> 
> s/sparse_ext_len/sparse_ext_cnt/ ?
> 
> -- Xiubo
> 

Sure, I'll make that change.
-- 
Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2022-03-21 10:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-18 13:50 [PATCH v3 0/5] ceph/libceph: add support for sparse reads to msgr2 crc codepath Jeff Layton
2022-03-18 13:50 ` [PATCH v3 1/5] libceph: add spinlock around osd->o_requests Jeff Layton
2022-03-18 13:50 ` [PATCH v3 2/5] libceph: define struct ceph_sparse_extent and add some helpers Jeff Layton
2022-03-21  7:57   ` Xiubo Li
2022-03-21 10:02     ` Jeff Layton [this message]
2022-03-18 13:50 ` [PATCH v3 3/5] libceph: add sparse read support to msgr2 crc state machine Jeff Layton
2022-03-18 13:50 ` [PATCH v3 4/5] libceph: add sparse read support to OSD client Jeff Layton
2022-03-21  8:41   ` Xiubo Li
2022-03-21 10:01     ` Jeff Layton
2022-03-21 14:17   ` Jeff Layton
2022-03-22  1:58   ` Xiubo Li
2022-03-22  2:09     ` Xiubo Li
2022-03-22 10:03     ` Jeff Layton
2022-03-18 13:50 ` [PATCH v3 5/5] ceph: convert to sparse reads Jeff Layton
2022-03-21 12:30   ` Jeff Layton

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=b50f3fb513fc4c38d0255179ae53b02a66778301.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.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