[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 04/18] fuse: Add fuse-export-remove
From: |
Max Reitz |
Subject: |
[PATCH 04/18] fuse: Add fuse-export-remove |
Date: |
Thu, 19 Dec 2019 15:38:04 +0100 |
Signed-off-by: Max Reitz <address@hidden>
---
block/fuse.c | 16 ++++++++++++++++
qapi/block.json | 15 +++++++++++++++
2 files changed, 31 insertions(+)
diff --git a/block/fuse.c b/block/fuse.c
index f18e8e7591..4e662e6dfb 100644
--- a/block/fuse.c
+++ b/block/fuse.c
@@ -123,6 +123,22 @@ fail:
close_fuse_session(session);
}
+void qmp_fuse_export_remove(const char *mountpoint, Error **errp)
+{
+ BdrvFuseSession *session = NULL;
+
+ if (sessions) {
+ session = g_hash_table_lookup(sessions, mountpoint);
+ }
+
+ if (!session) {
+ error_setg(errp, "No export found on '%s'", mountpoint);
+ return;
+ }
+
+ g_hash_table_remove(sessions, mountpoint);
+}
+
/**
* Drop all FUSE exports.
*/
diff --git a/qapi/block.json b/qapi/block.json
index 03f8d1b537..26768dc8ef 100644
--- a/qapi/block.json
+++ b/qapi/block.json
@@ -340,6 +340,21 @@
},
'if': 'defined(CONFIG_FUSE)' }
+##
+# @fuse-export-remove:
+#
+# Unmount an exported block graph node.
+#
+# @mountpoint: The export path given to fuse-export-add
+#
+# Since: 5.0
+##
+{ 'command': 'fuse-export-remove',
+ 'data': {
+ 'mountpoint': 'str'
+ },
+ 'if': 'defined(CONFIG_FUSE)' }
+
##
# @DEVICE_TRAY_MOVED:
#
--
2.23.0
- Re: [PATCH 02/18] fuse: Allow exporting BDSs via FUSE, (continued)
- Re: [PATCH 02/18] fuse: Allow exporting BDSs via FUSE, Kevin Wolf, 2019/12/20
- Re: [PATCH 02/18] fuse: Allow exporting BDSs via FUSE, Max Reitz, 2019/12/20
- Re: [PATCH 02/18] fuse: Allow exporting BDSs via FUSE, Markus Armbruster, 2019/12/20
- Re: [PATCH 02/18] fuse: Allow exporting BDSs via FUSE, Kevin Wolf, 2019/12/20
- Re: [PATCH 02/18] fuse: Allow exporting BDSs via FUSE, Markus Armbruster, 2019/12/20
- Re: [PATCH 02/18] fuse: Allow exporting BDSs via FUSE, Eric Blake, 2019/12/20
- Re: [PATCH 02/18] fuse: Allow exporting BDSs via FUSE, Markus Armbruster, 2019/12/20
- Re: [PATCH 02/18] fuse: Allow exporting BDSs via FUSE, Kevin Wolf, 2019/12/20
Re: [PATCH 02/18] fuse: Allow exporting BDSs via FUSE, Eric Blake, 2019/12/20
[PATCH 03/18] fuse: Implement standard FUSE operations, Max Reitz, 2019/12/19
[PATCH 04/18] fuse: Add fuse-export-remove,
Max Reitz <=
[PATCH 05/18] fuse: Allow growable exports, Max Reitz, 2019/12/19
[PATCH 06/18] fuse: (Partially) implement fallocate(), Max Reitz, 2019/12/19
[PATCH 07/18] fuse: Implement hole detection through lseek, Max Reitz, 2019/12/19
[PATCH 08/18] iotests: Do not needlessly filter _make_test_img, Max Reitz, 2019/12/19
[PATCH 09/18] iotests: Do not pipe _make_test_img, Max Reitz, 2019/12/19
[PATCH 10/18] iotests: Use convert -n in some cases, Max Reitz, 2019/12/19
[PATCH 11/18] iotests: Avoid renaming images, Max Reitz, 2019/12/19
[PATCH 12/18] iotests: Derive image names from $TEST_IMG, Max Reitz, 2019/12/19
[PATCH 13/18] iotests/091: Use _cleanup_qemu instad of "wait", Max Reitz, 2019/12/19
[PATCH 14/18] iotests: Restrict some Python tests to file, Max Reitz, 2019/12/19