summaryrefslogtreecommitdiffstats
path: root/fs/fuse/fuse_i.h
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2020-08-20 00:19:49 +0200
committerMiklos Szeredi <mszeredi@redhat.com>2020-09-10 11:39:22 +0200
commitfd1a1dc6f5aa7361e3562790336e116935f8fcfa (patch)
tree24d0bb3c17423ad0a1ef503ff8fe5212f4048f8a /fs/fuse/fuse_i.h
parentvirtiofs: keep a list of free dax memory ranges (diff)
downloadlinux-fd1a1dc6f5aa7361e3562790336e116935f8fcfa.tar.xz
linux-fd1a1dc6f5aa7361e3562790336e116935f8fcfa.zip
virtiofs: implement FUSE_INIT map_alignment field
The device communicates FUSE_SETUPMAPPING/FUSE_REMOVMAPPING alignment constraints via the FUST_INIT map_alignment field. Parse this field and ensure our DAX mappings meet the alignment constraints. We don't actually align anything differently since our mappings are already 2MB aligned. Just check the value when the connection is established. If it becomes necessary to honor arbitrary alignments in the future we'll have to adjust how mappings are sized. The upshot of this commit is that we can be confident that mappings will work even when emulating x86 on Power and similar combinations where the host page sizes are different. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/fuse_i.h')
-rw-r--r--fs/fuse/fuse_i.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index 97af7952373a..2f3f04aa64c7 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -1106,5 +1106,6 @@ void fuse_free_conn(struct fuse_conn *fc);
int fuse_dax_conn_alloc(struct fuse_conn *fc, struct dax_device *dax_dev);
void fuse_dax_conn_free(struct fuse_conn *fc);
+bool fuse_dax_check_alignment(struct fuse_conn *fc, unsigned int map_alignment);
#endif /* _FS_FUSE_I_H */