@@ -70,6 +70,7 @@ struct fuse_mount_data {
unsigned group_id_present:1;
unsigned default_permissions:1;
unsigned allow_other:1;
+ unsigned dax:1;
unsigned max_read;
unsigned blksize;
};
@@ -439,6 +439,7 @@ enum {
OPT_ALLOW_OTHER,
OPT_MAX_READ,
OPT_BLKSIZE,
+ OPT_DAX,
OPT_ERR
};
@@ -452,6 +453,7 @@ static const match_table_t tokens = {
{OPT_ALLOW_OTHER, "allow_other"},
{OPT_MAX_READ, "max_read=%u"},
{OPT_BLKSIZE, "blksize=%u"},
+ {OPT_DAX, "dax"},
{OPT_ERR, NULL}
};
@@ -543,6 +545,10 @@ int parse_fuse_opt(char *opt, struct fuse_mount_data *d, int is_bdev,
d->blksize = value;
break;
+ case OPT_DAX:
+ d->dax = 1;
+ break;
+
default:
return 0;
}
@@ -571,6 +577,8 @@ static int fuse_show_options(struct seq_file *m, struct dentry *root)
seq_printf(m, ",max_read=%u", fc->max_read);
if (sb->s_bdev && sb->s_blocksize != FUSE_DEFAULT_BLKSIZE)
seq_printf(m, ",blksize=%lu", sb->s_blocksize);
+ if (fc->dax_dev)
+ seq_printf(m, ",dax");
return 0;
}
@@ -1050,7 +1050,7 @@ static int virtio_fs_fill_super(struct super_block *sb, void *data,
/* TODO this sends FUSE_INIT and could cause hiprio or notifications
* virtqueue races since they haven't been set up yet!
*/
- err = fuse_fill_super_common(sb, &d, fs->dax_dev,
+ err = fuse_fill_super_common(sb, &d, d.dax ? fs->dax_dev : NULL,
&virtio_fs_fiq_ops, fs,
(void **)&fs->vqs[2].fud);
if (err < 0)