fuse_config pointer that can be used to adjust high-level API
specific configuration options.
+* The `nopath_flag` field of struct fuse_operations has been
+ removed. Instead, a new `nullpath_ok` flag can now be set
+ in struct fuse_config.
+
* File systems that use the low-level API and support lookup requests
for '.' and '..' should continue make sure to set the
FUSE_CAP_EXPORT_SUPPORT bit in fuse_conn_info->want.
int ac_attr_timeout_set;
double ac_attr_timeout;
+ /**
+ * If this option is given the file-system handlers for the
+ * following operations will not receive path information:
+ * read, write, flush, release, fsync, readdir, releasedir,
+ * fsyncdir, lock, ioctl and poll.
+ *
+ * For the truncate, getattr, chmod, chown and utimens
+ * operations the path will be provided only if the file is
+ * not currently open (i.e., when the struct fuse_file_info
+ * argument is NULL).
+ */
+ int nullpath_ok;
+
/**
* The remaining options are used by libfuse internally and
* should not be touched.
int show_help;
char *modules;
int debug;
- int nopath;
};
* is also a snapshot of the relevant wiki pages in the doc/ folder.
*/
struct fuse_operations {
- /**
- * Flag indicating that the path need not be calculated for
- * the following operations:
- *
- * read, write, flush, release, fsync, readdir, releasedir,
- * fsyncdir, lock, ioctl and poll
- *
- * For the following operations, the path will not be
- * calculated only if the file is currently open (i.e., the
- * struct fuse_file_info argument is non-NULL):
- *
- * truncate, getattr, chmod, chown, utimens
- *
- * If this flag is set then the path will not be calculaged even if the
- * file wasn't unlinked. However the path can still be non-NULL if it
- * needs to be calculated for some other reason.
- */
- unsigned int flag_nopath:1;
-
- /**
- * Reserved flags, don't set
- */
- unsigned int flag_reserved:31;
-
/** Get file attributes.
*
* Similar to stat(). The 'st_dev' and 'st_blksize' fields are
{
int err = 0;
- if (f->conf.nopath) {
+ if (f->conf.nullpath_ok) {
*path = NULL;
} else {
err = get_path_common(f, nodeid, NULL, path, NULL);
if(unlink_hidden) {
if (path) {
fuse_fs_unlink(f->fs, path);
- } else if (f->conf.nopath) {
+ } else if (f->conf.nullpath_ok) {
char *unlinkpath;
if (get_path(f, ino, &unlinkpath) == 0)
}
newfs->m = m;
f->fs = newfs;
- f->conf.nopath = newfs->op.flag_nopath && f->conf.nopath;
return 0;
}
goto out_delete_context_key;
f->fs = fs;
- f->conf.nopath = fs->op.flag_nopath;
/* Oh f**k, this is ugly! */
if (!fs->op.lock) {
goto out_free_fs;
if (f->conf.debug) {
- fprintf(stderr, "nopath: %i\n", f->conf.nopath);
+ fprintf(stderr, "nullpath_ok: %i\n", f->conf.nullpath_ok);
}
/* Trace topmost layer by default */