CEPH filesystem development
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Xiubo Li <xiubli@redhat.com>
Cc: dhowells@redhat.com, ceph-devel@vger.kernel.org, idryomov@gmail.com
Subject: Re: [PATCH wip-fscrypt] ceph: reset "err = 0" after iov_get_pages_alloc in ceph_netfs_issue_read
Date: Fri, 08 Jul 2022 06:57:24 -0400	[thread overview]
Message-ID: <ea91438a349390dd0daf8130f8fae18564f99f2f.camel@kernel.org> (raw)
In-Reply-To: <d5e9d800-750f-2422-8ff6-fe4eb2cd10bc@redhat.com>

On Fri, 2022-07-08 at 08:27 +0800, Xiubo Li wrote:
> On 7/7/22 10:08 PM, Jeff Layton wrote:
> > Currently, when we call ceph_netfs_issue_read for an encrypted inode,
> > we'll call iov_iter_get_pages_alloc and assign its result to "err".
> > Later we'll end up inappropriately calling netfs_subreq_terminated with
> > that value after submitting the request. Ensure we reset "err = 0;"
> > after calling iov_iter_get_pages_alloc.
> > 
> > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> > ---
> >   fs/ceph/addr.c | 1 +
> >   1 file changed, 1 insertion(+)
> > 
> > Probably this should get squashed into the patch that adds fscrypt
> > support to buffered reads.
> > 
> > diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
> > index c713b5491012..64facef79883 100644
> > --- a/fs/ceph/addr.c
> > +++ b/fs/ceph/addr.c
> > @@ -376,6 +376,7 @@ static void ceph_netfs_issue_read(struct netfs_io_subrequest *subreq)
> >   		/* should always give us a page-aligned read */
> >   		WARN_ON_ONCE(page_off);
> >   		len = err;
> > +		err = 0;
> >   
> >   		osd_req_op_extent_osd_data_pages(req, 0, pages, len, 0, false, false);
> >   	} else {
> Looks good. Thanks Jeff!
> 
> Show we fold it into the previous patch ?
> 
> -- Xiubo
> 
> 

Yes, please do.
-- 
Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2022-07-08 10:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-07 14:08 [PATCH wip-fscrypt] ceph: reset "err = 0" after iov_get_pages_alloc in ceph_netfs_issue_read Jeff Layton
2022-07-08  0:27 ` Xiubo Li
2022-07-08 10:57   ` Jeff Layton [this message]
2022-07-11  4:37     ` Xiubo Li

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=ea91438a349390dd0daf8130f8fae18564f99f2f.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=dhowells@redhat.com \
    --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