[PATCH 2/3] fuse: add 'removemapping'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Dr. David Alan Gilbert" <dgilbert@xxxxxxxxxx>

'removemapping' is the complement to 'setupmapping', it unmaps
a range of mapped files from the window visible to the kernel.

A 'removemapping' call consists of 'count' regions to unmap,
each consisting of an offset and length.

Signed-off-by: Vivek Goyal <vgoyal@xxxxxxxxxx>
Signed-off-by: Peng Tao <tao.peng@xxxxxxxxxxxxxxxxx>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@xxxxxxxxxx>
---
 include/uapi/linux/fuse.h | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h
index fb79d4d0b3a7..f14eeb5cfc14 100644
--- a/include/uapi/linux/fuse.h
+++ b/include/uapi/linux/fuse.h
@@ -133,7 +133,7 @@
  *
  *  7.31
  *  - add FUSE_WRITE_KILL_PRIV flag
- *  - add FUSE_SETUPMAPPING
+ *  - add FUSE_SETUPMAPPING and FUSE_REMOVEMAPPING
  */
 
 #ifndef _LINUX_FUSE_H
@@ -424,6 +424,7 @@ enum fuse_opcode {
 	FUSE_LSEEK		= 46,
 	FUSE_COPY_FILE_RANGE	= 47,
 	FUSE_SETUPMAPPING	= 48,
+	FUSE_REMOVEMAPPING	= 49,
 
 	/* CUSE specific operations */
 	CUSE_INIT		= 4096,
@@ -862,4 +863,16 @@ struct fuse_setupmapping_in {
 	uint64_t	moffset;
 };
 
+struct fuse_removemapping_in {
+	/* number of fuse_removemapping_one following */
+	uint32_t	count;
+};
+
+struct fuse_removemapping_one {
+	/* Offset into the dax window at start of unmapping */
+	uint64_t	moffset;
+	/* Length of unmapping required */
+	uint64_t	len;
+};
+
 #endif /* _LINUX_FUSE_H */
-- 
2.21.0




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux