From: Trond Myklebust <trondmy@hammerspace.com>
To: "dwysocha@redhat.com" <dwysocha@redhat.com>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: Oops in nfs_scan_commit running xfstest generic/005 with NFSv4.2 and hammerspace flexfiles server
Date: Sun, 10 Oct 2021 21:27:43 +0000 [thread overview]
Message-ID: <caaa58479dd20674550dbb98f6f43f1b3568f671.camel@hammerspace.com> (raw)
In-Reply-To: <CALF+zOkcW9Rm271dSfJ-ukB991iLboXLAVRwd-AosALjqb47Vg@mail.gmail.com>
On Sun, 2021-10-10 at 10:35 -0400, David Wysochanski wrote:
> Now I get the below WARN_ON pop though indicating
> nfs_have_writebacks() is true when inside nfs_clear_inode() and I
> think I saw this once before.
> I think we need some simple fixup to nfs_have_writebacks() due to the
> union-ization in your patch:
> commit b712e11b99eadba5b4003dd815adb368835fb5d5
> Author: Trond Myklebust <trond.myklebust@hammerspace.com>
> Date: Tue Sep 28 17:41:41 2021 -0400
>
> NFS: Save some space in the inode
>
> Save some space in the nfs_inode by setting up an anonymous union
> with
> the fields that are peculiar to a specific type of filesystem
> object.
>
> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
>
>
> You may want to fold something like this into the above which fixes
> the WARN for me:
> diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
> index a5aef2cbe4ee..5a110ecf2d85 100644
> --- a/include/linux/nfs_fs.h
> +++ b/include/linux/nfs_fs.h
> @@ -579,7 +579,9 @@ extern int nfs_access_get_cached(struct inode
> *inode, const struct cred *cred, s
> static inline int
> nfs_have_writebacks(struct inode *inode)
> {
> - return atomic_long_read(&NFS_I(inode)->nrequests) != 0;
> + if (S_ISREG(inode->i_mode))
> + return atomic_long_read(&NFS_I(inode)->nrequests) !=
> 0;
> + return 0;
> }
>
Thanks again for testing and for the bug reports, Dave! Can you please
resend the above patch with a signed-off-by line? I'll be happy to
apply it.
--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com
prev parent reply other threads:[~2021-10-10 21:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-09 13:34 Oops in nfs_scan_commit running xfstest generic/005 with NFSv4.2 and hammerspace flexfiles server David Wysochanski
2021-10-10 9:04 ` Trond Myklebust
2021-10-10 14:35 ` David Wysochanski
2021-10-10 21:27 ` Trond Myklebust [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=caaa58479dd20674550dbb98f6f43f1b3568f671.camel@hammerspace.com \
--to=trondmy@hammerspace.com \
--cc=dwysocha@redhat.com \
--cc=linux-nfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).