CEPH filesystem development
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: John Hubbard <jhubbard@nvidia.com>, ceph-devel@vger.kernel.org
Cc: idryomov@gmail.com, ukernel@gmail.com, viro@zeniv.linux.org.uk
Subject: Re: [PATCH] ceph: drop special-casing for ITER_PIPE in ceph_sync_read
Date: Wed, 26 Aug 2020 08:07:20 -0400	[thread overview]
Message-ID: <72113751267b6ca23def361c19c0a85524735e3e.camel@kernel.org> (raw)
In-Reply-To: <1143a189-7953-d523-bfd2-0fed8da83ac8@nvidia.com>

On Tue, 2020-08-25 at 13:28 -0700, John Hubbard wrote:
> On 8/25/20 1:13 PM, Jeff Layton wrote:
> > From: John Hubbard <jhubbard@nvidia.com>
> > 
> 
> I think that's meant to be, "From: Jeff Layton <jlayton@kernel.org>".

Yeah, sorry -- artifact from squashing patches together. I noticed this
after I sent it out. It's fixed in tree though.

> This looks much nicer than what I came up with. :)
> 
> > This special casing was added in 7ce469a53e71 (ceph: fix splice
> > read for no Fc capability case). The confirm callback for ITER_PIPE
> > expects that the page is Uptodate or a pagecache page and and returns
> > an error otherwise.
> > 
> > A simpler workaround is just to use the Uptodate bit, which has no
> > meaning for anonymous pages. Rip out the special casing for ITER_PIPE
> > and just SetPageUptodate before we copy to the iter.
> > 
> > Cc: "Yan, Zheng" <ukernel@gmail.com>
> > Cc: John Hubbard <jhubbard@nvidia.com>
> > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> > Suggested-by: Al Viro <viro@zeniv.linux.org.uk>
> > ---
> >   fs/ceph/file.c | 71 +++++++++++++++++---------------------------------
> >   1 file changed, 24 insertions(+), 47 deletions(-)
> > 
> > diff --git a/fs/ceph/file.c b/fs/ceph/file.c
> > index fb3ea715a19d..ed8fbfe3bddc 100644
> > --- a/fs/ceph/file.c
> > +++ b/fs/ceph/file.c
> > @@ -863,6 +863,8 @@ static ssize_t ceph_sync_read(struct kiocb *iocb, struct iov_iter *to,
> >   		size_t page_off;
> >   		u64 i_size;
> >   		bool more;
> > +		int idx;
> > +		size_t left;
> >   
> >   		req = ceph_osdc_new_request(osdc, &ci->i_layout,
> >   					ci->i_vino, off, &len, 0, 1,
> > @@ -876,29 +878,13 @@ static ssize_t ceph_sync_read(struct kiocb *iocb, struct iov_iter *to,
> >   
> >   		more = len < iov_iter_count(to);
> >   
> > -		if (unlikely(iov_iter_is_pipe(to))) {
> > -			ret = iov_iter_get_pages_alloc(to, &pages, len,
> > -						       &page_off);
> 
> +1 for removing a call to iov_iter_get_pages_alloc()! My list is shorter now.
> 

Yep, and we got rid of some special-casing in ceph to boot. Thanks for
bringing it to our attention!

-- 
Jeff Layton <jlayton@kernel.org>


      reply	other threads:[~2020-08-26 12:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-25 20:13 [PATCH] ceph: drop special-casing for ITER_PIPE in ceph_sync_read Jeff Layton
2020-08-25 20:28 ` John Hubbard
2020-08-26 12:07   ` Jeff Layton [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=72113751267b6ca23def361c19c0a85524735e3e.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=jhubbard@nvidia.com \
    --cc=ukernel@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    /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