linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miklos Szeredi <miklos@szeredi.hu>
To: Antonio SJ Musumeci <trapexit@spawn.link>
Cc: Bernd Schubert <bernd.schubert@fastmail.fm>,
	Amir Goldstein <amir73il@gmail.com>,
	 linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	 fuse-devel <fuse-devel@lists.sourceforge.net>
Subject: Re: [fuse-devel] Proxmox + NFS w/ exported FUSE = EIO
Date: Tue, 20 Feb 2024 09:47:34 +0100	[thread overview]
Message-ID: <CAJfpegssrySj4Yssu4roFHZn1jSPZ-FLfb=HX4VDsTP2jY5BLA@mail.gmail.com> (raw)
In-Reply-To: <CAJfpeguvX1W2M9kY-4Tx9oJhSYE2+nHQuGXDNPw+1_9jtMO7zA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 616 bytes --]

On Tue, 20 Feb 2024 at 09:35, Miklos Szeredi <miklos@szeredi.hu> wrote:
>
> On Mon, 19 Feb 2024 at 20:54, Antonio SJ Musumeci <trapexit@spawn.link> wrote:
> >
> > On 2/19/24 13:38, Miklos Szeredi wrote:
> > > On Mon, 19 Feb 2024 at 20:05, Antonio SJ Musumeci <trapexit@spawn.link> wrote:
> > >
> > >> This is what I see from the kernel:
> > >>
> > >> lookup(nodeid=3, name=.);
> > >> lookup(nodeid=3, name=..);
> > >> lookup(nodeid=1, name=dir2);
> > >> lookup(nodeid=1, name=..);
>
>
> Can you please try the attached patch?

Sorry, missing one hunk from the previous patch.  Here's an updated one.

Thanks,
Miklos

[-- Attachment #2: fuse-fix-bad-root-v2.patch --]
[-- Type: text/x-patch, Size: 800 bytes --]

---
 fs/fuse/dir.c    |    2 +-
 fs/fuse/fuse_i.h |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -1210,7 +1210,7 @@ static int fuse_do_statx(struct inode *i
 	if (((sx->mask & STATX_SIZE) && !fuse_valid_size(sx->size)) ||
 	    ((sx->mask & STATX_TYPE) && (!fuse_valid_type(sx->mode) ||
 					 inode_wrong_type(inode, sx->mode)))) {
-		make_bad_inode(inode);
+		fuse_make_bad(inode);
 		return -EIO;
 	}
 
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -939,7 +939,8 @@ static inline bool fuse_stale_inode(cons
 
 static inline void fuse_make_bad(struct inode *inode)
 {
-	remove_inode_hash(inode);
+	if (get_fuse_inode(inode)->nodeid != FUSE_ROOT_ID)
+		remove_inode_hash(inode);
 	set_bit(FUSE_I_BAD, &get_fuse_inode(inode)->state);
 }
 

  reply	other threads:[~2024-02-20  8:47 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <d997c02b-d5ef-41f8-92b6-8c6775899388@spawn.link>
2024-02-06  6:53 ` [fuse-devel] Proxmox + NFS w/ exported FUSE = EIO Amir Goldstein
2024-02-07  0:08   ` Antonio SJ Musumeci
2024-02-07  7:24     ` Amir Goldstein
     [not found]   ` <b9cec6b7-0973-4d61-9bef-120e3c4654d7@spawn.link>
     [not found]     ` <CAOQ4uxgZR4OtCkdrpcDGCK-MqZEHcrx+RY4G94saqaXVkL4cKA@mail.gmail.com>
2024-02-18  0:48       ` Antonio SJ Musumeci
2024-02-19 11:36         ` Bernd Schubert
2024-02-19 19:05           ` Antonio SJ Musumeci
2024-02-19 19:17             ` Bernd Schubert
2024-02-19 19:38             ` Miklos Szeredi
2024-02-19 19:54               ` Antonio SJ Musumeci
2024-02-20  8:35                 ` Miklos Szeredi
2024-02-20  8:47                   ` Miklos Szeredi [this message]
2024-02-22  1:25                     ` Antonio SJ Musumeci
2024-02-22 11:09                       ` Miklos Szeredi
2024-02-25  0:18                         ` Antonio SJ Musumeci
2024-02-25 20:58                           ` Antonio SJ Musumeci
2024-02-28 13:06                             ` Miklos Szeredi
2024-02-28 13:16                               ` Bernd Schubert
2024-02-28 14:14                                 ` Miklos Szeredi
2024-02-28 16:03                                   ` Miklos Szeredi
2024-02-19 19:55               ` Bernd Schubert
2024-02-19 19:58                 ` Miklos Szeredi
2024-02-19 21:14                   ` Bernd Schubert
2024-02-19 23:22                     ` Bernd Schubert

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='CAJfpegssrySj4Yssu4roFHZn1jSPZ-FLfb=HX4VDsTP2jY5BLA@mail.gmail.com' \
    --to=miklos@szeredi.hu \
    --cc=amir73il@gmail.com \
    --cc=bernd.schubert@fastmail.fm \
    --cc=fuse-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=trapexit@spawn.link \
    /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).