Re: [fuse-devel] Proxmox + NFS w/ exported FUSE = EIO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 20 Feb 2024 at 09:35, Miklos Szeredi <miklos@xxxxxxxxxx> wrote:
>
> On Mon, 19 Feb 2024 at 20:54, Antonio SJ Musumeci <trapexit@xxxxxxxxxx> wrote:
> >
> > On 2/19/24 13:38, Miklos Szeredi wrote:
> > > On Mon, 19 Feb 2024 at 20:05, Antonio SJ Musumeci <trapexit@xxxxxxxxxx> 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
---
 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);
 }
 

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux