* kernel: check if mandatory mount options ('fd', 'rootmode',
'user_id', 'group_id') are all given
+ * lib: simplify 'readdir_ino' handling
+
2005-07-03 Miklos Szeredi <miklos@szeredi.hu>
* kernel: clean up 'direct_io' code
Sets the filesystem name. The default is the program name.
+use_ino
+
+ Honor the 'st_ino' field in getattr() and fill_dir(). This value is
+ used to fill in the 'st_ino' field in the stat()/lstat()/fstat()
+ functions and the 'd_ino' field in the readdir() function. The
+ filesystem does not have to guarantee uniqueness, however some
+ applications rely on this value being unique for the whole
+ filesystem.
+
+readdir_ino
+
+ If 'use_ino' option is not given, still try to fill in the 'd_ino'
+ field in readdir(). If the name was previously looked up, and is
+ still in the cache, the inode number found there will be used.
+ Otherwise it will be set to '-1'. If 'use_ino' option is given,
+ this option is ignored.
+
nonempty
Allows mounts over a non-empty file or directory. By default these
int filled;
unsigned long fh;
int error;
- struct node *node;
+ nodeid_t nodeid;
};
struct fuse_cmd {
dh->contents = NULL;
dh->len = 0;
dh->filled = 0;
- if (f->flags & FUSE_READDIR_INO) {
- pthread_mutex_lock(&f->lock);
- dh->node = get_node(f, in->nodeid);
- pthread_mutex_unlock(&f->lock);
- }
+ dh->nodeid = in->nodeid;
mutex_init(&dh->lock);
memset(&outarg, 0, sizeof(outarg));
if (dh->fuse->flags & FUSE_READDIR_INO) {
struct node *node;
pthread_mutex_lock(&dh->fuse->lock);
- node = lookup_node(dh->fuse, dh->node->nodeid, name);
+ node = lookup_node(dh->fuse, dh->nodeid, name);
if (node)
ino = (ino_t) node->nodeid;
pthread_mutex_unlock(&dh->fuse->lock);
" fsname=NAME set filesystem name in mtab\n"
" use_ino let filesystem set inode numbers\n"
" readdir_ino try to fill in d_ino in readdir\n"
+ " nonempty allow mounts over non-empty file/dir\n"
);
}