linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
To: linux-fsdevel@vger.kernel.org, miklos@szeredi.hu, Nikolaus@rath.org
Cc: stefanha@redhat.com, vgoyal@redhat.com, tao.peng@linux.alibaba.com
Subject: [PATCH 2/3] fuse: add 'removemapping'
Date: Fri,  2 Aug 2019 18:15:20 +0100	[thread overview]
Message-ID: <20190802171521.21807-3-dgilbert@redhat.com> (raw)
In-Reply-To: <20190802171521.21807-1-dgilbert@redhat.com>

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

'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@redhat.com>
Signed-off-by: Peng Tao <tao.peng@linux.alibaba.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 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


  parent reply	other threads:[~2019-08-02 17:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-02 17:15 [PATCH 0/3] Fuse definitions for virtiofs Dr. David Alan Gilbert (git)
2019-08-02 17:15 ` [PATCH 1/3] fuse: Add 'setupmapping' Dr. David Alan Gilbert (git)
2019-08-02 17:15 ` Dr. David Alan Gilbert (git) [this message]
2019-08-02 17:15 ` [PATCH 3/3] fuse: Add map_alignment for setup/remove mapping Dr. David Alan Gilbert (git)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190802171521.21807-3-dgilbert@redhat.com \
    --to=dgilbert@redhat.com \
    --cc=Nikolaus@rath.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=stefanha@redhat.com \
    --cc=tao.peng@linux.alibaba.com \
    --cc=vgoyal@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).