[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug #17877] Invalid "No such file or directory" error on filesystem
From: |
Miklos Szeredi |
Subject: |
Re: [bug #17877] Invalid "No such file or directory" error on filesystem without stable inode numbers |
Date: |
Mon, 02 Oct 2006 12:29:42 +0200 |
> > Follow-up Comment #1, bug #17877 (project findutils):
> >
> > > There are several Linux filesystems (including smbfs, fat, and
> > > some FUSE based ones) which cannot provide stable inode numbers
> > > for unreferenced files or directories.
>
> OP, can you provide a test case which demonstrates the problem?
> I will investigate when I have web and SSH access again next week.
The test case is to do "find . > /dev/null" on a large enough tree on
a machine with low enough memory, so that some of the inodes which fts
rememebers are evicted from the icache between the two stats.
Also attached a patch for fuse-2.5.3, which forces the kernel to drop
inodes from the cache immediately if there are no references to it.
This makes it easy to reliably reproduce the problem.
> > That's the problem. If an OS can't provide stable inode numbers, it is not
> > POSIX compliant. find shouldn't have to bend over backwards to work around
> > broken file systems.
>
> I don't agree. POSIX-compliant systems are allowed to support
> non-POSIX-compliant filesystems, and GNU findutils should be able to
> search them.
>
> > You should be reporting this bug to the file system
> > people.
>
> But you're right about this.
For some of the cases this is an intrinsic property of the filesystem,
not an implementation issue. You cannot map a larger unique ID space
(e.g. path name) to a smaller unique ID space (st_ino) with bounded
memory requirements.
Miklos
Index: kernel/dir.c
===================================================================
RCS file: /cvsroot/fuse/fuse/kernel/dir.c,v
retrieving revision 1.101.2.1
diff -u -r1.101.2.1 dir.c
--- kernel/dir.c 10 Apr 2006 08:56:41 -0000 1.101.2.1
+++ kernel/dir.c 2 Oct 2006 10:12:29 -0000
@@ -185,12 +185,18 @@
}
#endif
+static int fuse_dentry_delete(struct dentry *entry)
+{
+ return 1;
+}
+
static struct dentry_operations fuse_dentry_operations = {
#ifdef KERNEL_2_6
.d_revalidate = fuse_dentry_revalidate,
#else
.d_revalidate = fuse_dentry_revalidate_2_4,
#endif
+ .d_delete = fuse_dentry_delete,
};
static inline int valid_mode(int m)
Index: kernel/inode.c
===================================================================
RCS file: /cvsroot/fuse/fuse/kernel/inode.c,v
retrieving revision 1.89
diff -u -r1.89 inode.c
--- kernel/inode.c 6 Jan 2006 18:29:39 -0000 1.89
+++ kernel/inode.c 2 Oct 2006 10:12:30 -0000
@@ -599,6 +599,7 @@
.destroy_inode = fuse_destroy_inode,
.read_inode = fuse_read_inode,
.clear_inode = fuse_clear_inode,
+ .drop_inode = generic_delete_inode,
.put_super = fuse_put_super,
.statfs = fuse_statfs,
.show_options = fuse_show_options,
- Re: [bug #17877] Invalid "No such file or directory" error on filesystem without stable inode numbers, James Youngman, 2006/10/01
- Re: [bug #17877] Invalid "No such file or directory" error on filesystem without stable inode numbers,
Miklos Szeredi <=
- [bug #17877] Invalid "No such file or directory" error on filesystem without stable inode numbers, Paul Eggert, 2006/10/04
- [bug #17877] Invalid "No such file or directory" error on filesystem without stable inode numbers, Miklos Szeredi, 2006/10/04
- [bug #17877] Invalid "No such file or directory" error on filesystem without stable inode numbers, Paul Eggert, 2006/10/05
- [bug #17877] Invalid "No such file or directory" error on filesystem without stable inode numbers, Miklos Szeredi, 2006/10/06