diff options
author | Jeffle Xu <jefflexu@linux.alibaba.com> | 2021-11-25 15:05:28 +0800 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2021-12-14 11:09:37 +0100 |
commit | 2ee019fadcca343c3deea6a1767965bdf23fc3d0 (patch) | |
tree | f167c77e4cef2465e4fcff4e2931abebfddabee4 /fs/fuse/dax.c | |
parent | 93a497b9ad695bb2f38a302c5b29dbc9b555ff3f (diff) | |
download | lwn-2ee019fadcca343c3deea6a1767965bdf23fc3d0.tar.gz lwn-2ee019fadcca343c3deea6a1767965bdf23fc3d0.zip |
fuse: negotiate per inode DAX in FUSE_INIT
Among the FUSE_INIT phase, client shall advertise per inode DAX if it's
mounted with "dax=inode". Then server is aware that client is in per
inode DAX mode, and will construct per-inode DAX attribute accordingly.
Server shall also advertise support for per inode DAX. If server doesn't
support it while client is mounted with "dax=inode", client will
silently fallback to "dax=never" since "dax=inode" is advisory only.
Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com>
Reviewed-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/dax.c')
-rw-r--r-- | fs/fuse/dax.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fuse/dax.c b/fs/fuse/dax.c index ff17bc7a0b6e..663270dc6e20 100644 --- a/fs/fuse/dax.c +++ b/fs/fuse/dax.c @@ -1349,7 +1349,7 @@ static bool fuse_should_enable_dax(struct inode *inode, unsigned int flags) return true; /* dax_mode is FUSE_DAX_INODE* */ - return flags & FUSE_ATTR_DAX; + return fc->inode_dax && (flags & FUSE_ATTR_DAX); } void fuse_dax_inode_init(struct inode *inode, unsigned int flags) |