mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chuck Lever III <chuck.lever@oracle.com>
To: Anders Blomdell <anders.blomdell@control.lth.se>
Cc: Jeff Layton <jlayton@kernel.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH 1/1] Make nfsd_splice_actor work with reads with a non-zero offset that doesn't end on a page boundary
Date: Wed, 23 Nov 2022 17:54:37 +0000	[thread overview]
Message-ID: <A81AF482-D4FE-4449-B42F-FA31651F93BD@oracle.com> (raw)
In-Reply-To: <ba550d60-7fd2-a68f-0ea1-798fd9eb3315@control.lth.se>



> On Nov 23, 2022, at 12:50 PM, Anders Blomdell <anders.blomdell@control.lth.se> wrote:
> 
> Make nfsd_splice_actor work with reads with a non-zero offset that doesn't end on a page boundary.
> 
> This was found when virtual machines with nfs-mounted qcow2 disks failed to boot properly (originally found
> on v6.0.5, fix also needed and tested on v6.0.9 and v6.1-rc6).
> 
> Signed-off-by: Anders Blomdell <anders.blomdell@control.lth.se>
> Link: https://bugzilla.redhat.com/show_bug.cgi?id=2142132
> Fixes: bfbfb6182ad1 "nfsd_splice_actor(): handle compound pages"
> Cc: stable@vger.kernel.org # v6.0+
> 
> --- a/fs/nfsd/vfs.c
> +++ b/fs/nfsd/vfs.c
> @@ -873,7 +873,7 @@ nfsd_splice_actor(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
>        unsigned offset = buf->offset;
>         page += offset / PAGE_SIZE;
> -       for (int i = sd->len; i > 0; i -= PAGE_SIZE)
> +       for (int i = sd->len + offset % PAGE_SIZE; i > 0; i -= PAGE_SIZE)
>                svc_rqst_replace_page(rqstp, page++);
>        if (rqstp->rq_res.page_len == 0)        // first call
>                rqstp->rq_res.page_base = offset % PAGE_SIZE;

Thanks. I actually find Al's suggestion (posted in the other thread)
preferable. Can you test that and repost? I will then apply the fix
immediately to nfsd's for-rc tree.


--
Chuck Lever




      reply	other threads:[~2022-11-23 17:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-23 17:50 Anders Blomdell
2022-11-23 17:54 ` Chuck Lever III [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=A81AF482-D4FE-4449-B42F-FA31651F93BD@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=anders.blomdell@control.lth.se \
    --cc=jlayton@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®