CEPH filesystem development
 help / color / mirror / Atom feed
From: John Hubbard <jhubbard@nvidia.com>
To: Jeff Layton <jlayton@kernel.org>, <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: Tue, 25 Aug 2020 13:28:48 -0700	[thread overview]
Message-ID: <1143a189-7953-d523-bfd2-0fed8da83ac8@nvidia.com> (raw)
In-Reply-To: <20200825201326.286242-1-jlayton@kernel.org>

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>".
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.


thanks,
-- 
John Hubbard
NVIDIA

  reply	other threads:[~2020-08-25 20:28 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 [this message]
2020-08-26 12:07   ` 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=1143a189-7953-d523-bfd2-0fed8da83ac8@nvidia.com \
    --to=jhubbard@nvidia.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=jlayton@kernel.org \
    --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