All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Ilya Dryomov <idryomov@gmail.com>
Cc: Ceph Development <ceph-devel@vger.kernel.org>,
	"Yan, Zheng" <zyan@redhat.com>, Sage Weil <sage@redhat.com>,
	Patrick Donnelly <pdonnell@redhat.com>,
	Xiubo Li <xiubli@redhat.com>
Subject: Re: [RFC PATCH v2 08/10] ceph: add new MDS req field to hold delegated inode number
Date: Fri, 17 Jan 2020 11:53:39 -0500	[thread overview]
Message-ID: <374a760e8fae44e5cbdfd1bafa1f8f318e23770f.camel@kernel.org> (raw)
In-Reply-To: <CAOi1vP_oXUTLfhMU6qWfk9Ha=09BdmwF52MeoytKHQWz+Mfwdw@mail.gmail.com>

On Fri, 2020-01-17 at 15:47 +0100, Ilya Dryomov wrote:
> On Wed, Jan 15, 2020 at 9:59 PM Jeff Layton <jlayton@kernel.org> wrote:
> > Add new request field to hold the delegated inode number. Encode that
> > into the message when it's set.
> > 
> > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> > ---
> >  fs/ceph/mds_client.c | 3 +--
> >  fs/ceph/mds_client.h | 1 +
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
> > index e49ca0533df1..b8070e8c4686 100644
> > --- a/fs/ceph/mds_client.c
> > +++ b/fs/ceph/mds_client.c
> > @@ -2466,7 +2466,7 @@ static struct ceph_msg *create_request_message(struct ceph_mds_client *mdsc,
> >         head->op = cpu_to_le32(req->r_op);
> >         head->caller_uid = cpu_to_le32(from_kuid(&init_user_ns, req->r_uid));
> >         head->caller_gid = cpu_to_le32(from_kgid(&init_user_ns, req->r_gid));
> > -       head->ino = 0;
> > +       head->ino = cpu_to_le64(req->r_deleg_ino);
> >         head->args = req->r_args;
> > 
> >         ceph_encode_filepath(&p, end, ino1, path1);
> > @@ -2627,7 +2627,6 @@ static int __prepare_send_request(struct ceph_mds_client *mdsc,
> >         rhead->flags = cpu_to_le32(flags);
> >         rhead->num_fwd = req->r_num_fwd;
> >         rhead->num_retry = req->r_attempts - 1;
> > -       rhead->ino = 0;
> > 
> >         dout(" r_parent = %p\n", req->r_parent);
> >         return 0;
> > diff --git a/fs/ceph/mds_client.h b/fs/ceph/mds_client.h
> > index 2a32afa15eb6..0811543ffd79 100644
> > --- a/fs/ceph/mds_client.h
> > +++ b/fs/ceph/mds_client.h
> > @@ -308,6 +308,7 @@ struct ceph_mds_request {
> >         int               r_num_fwd;    /* number of forward attempts */
> >         int               r_resend_mds; /* mds to resend to next, if any*/
> >         u32               r_sent_on_mseq; /* cap mseq request was sent at*/
> > +       unsigned long     r_deleg_ino;
> 
> u64, as head->ino is __le64?
> 

Does that actually matter? It should get promoted to 64 bit when we do
the encoding since we're passing by value, and this will never be larger
than 32 bits on a 32 bit box.

-- 
Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2020-01-17 16:53 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-15 20:59 [RFC PATCH v2 00/10] ceph: asynchronous file create support Jeff Layton
2020-01-15 20:59 ` [RFC PATCH v2 01/10] libceph: export ceph_file_layout_is_valid Jeff Layton
2020-01-15 20:59 ` [RFC PATCH v2 02/10] ceph: make ceph_fill_inode non-static Jeff Layton
2020-01-15 20:59 ` [RFC PATCH v2 03/10] ceph: make dentry_lease_is_valid non-static Jeff Layton
2020-01-15 20:59 ` [RFC PATCH v2 04/10] ceph: make __take_cap_refs a public function Jeff Layton
2020-01-15 20:59 ` [RFC PATCH v2 05/10] ceph: decode interval_sets for delegated inos Jeff Layton
2020-01-16 14:32   ` Yan, Zheng
2020-01-16 15:37     ` Jeff Layton
2020-01-15 20:59 ` [RFC PATCH v2 06/10] ceph: add flag to designate that a request is asynchronous Jeff Layton
2020-01-15 20:59 ` [RFC PATCH v2 07/10] ceph: add infrastructure for waiting for async create to complete Jeff Layton
2020-01-17 15:00   ` Ilya Dryomov
2020-01-17 16:49     ` Jeff Layton
2020-01-15 20:59 ` [RFC PATCH v2 08/10] ceph: add new MDS req field to hold delegated inode number Jeff Layton
2020-01-17 14:47   ` Ilya Dryomov
2020-01-17 16:53     ` Jeff Layton [this message]
2020-01-17 17:42       ` Ilya Dryomov
2020-01-17 18:31         ` Jeff Layton
2020-01-20  9:41           ` Ilya Dryomov
2020-01-15 20:59 ` [RFC PATCH v2 09/10] ceph: cache layout in parent dir on first sync create Jeff Layton
2020-01-15 20:59 ` [RFC PATCH v2 10/10] ceph: attempt to do async create when possible Jeff Layton
2020-01-16 15:09   ` Yan, Zheng
2020-01-16 16:21     ` Jeff Layton
2020-01-17 13:28   ` Yan, Zheng
2020-01-17 17:40     ` Jeff Layton
2020-01-18  2:42       ` Yan, Zheng
2020-01-15 21:30 ` [RFC PATCH v2 00/10] ceph: asynchronous file create support Jeff Layton
2020-01-16  8:57 ` Xiubo Li
2020-01-16 13:10 ` Yan, Zheng
2020-01-16 14:15   ` Jeff Layton
2020-01-20 13:20 ` Yan, Zheng
2020-01-21 10:56   ` Jeff Layton
2020-01-21 13:20     ` Yan, Zheng
2020-01-21 14:37       ` 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=374a760e8fae44e5cbdfd1bafa1f8f318e23770f.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=pdonnell@redhat.com \
    --cc=sage@redhat.com \
    --cc=xiubli@redhat.com \
    --cc=zyan@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.