[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 15/24] DAX: virtiofsd: Perform an unmap on destroy
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PATCH 15/24] DAX: virtiofsd: Perform an unmap on destroy |
Date: |
Tue, 9 Feb 2021 19:02:15 +0000 |
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Force unmap all remaining dax cache entries on a destroy.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
tools/virtiofsd/passthrough_ll.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
index badac23fef..21ddb434ae 100644
--- a/tools/virtiofsd/passthrough_ll.c
+++ b/tools/virtiofsd/passthrough_ll.c
@@ -2947,6 +2947,17 @@ static void lo_destroy(void *userdata, struct
fuse_session *se)
{
struct lo_data *lo = (struct lo_data *)userdata;
+ if (fuse_lowlevel_is_virtio(se)) {
+ VhostUserFSSlaveMsg msg = { 0 };
+
+ msg.len[0] = ~(uint64_t)0; /* Special: means 'all' */
+ msg.c_offset[0] = 0;
+ if (fuse_virtio_unmap(se, &msg)) {
+ fuse_log(FUSE_LOG_ERR, "%s: unmap during destroy failed\n",
+ __func__);
+ }
+ }
+
pthread_mutex_lock(&lo->mutex);
while (true) {
GHashTableIter iter;
--
2.29.2
- Re: [PATCH 10/24] DAX: virtiofsd: Add setup/remove mappings fuse commands, (continued)
- [PATCH 12/24] DAX: virtiofsd: Wire up passthrough_ll's lo_setupmapping, Dr. David Alan Gilbert (git), 2021/02/09
- [PATCH 11/24] DAX: virtiofsd: Add setup/remove mapping handlers to passthrough_ll, Dr. David Alan Gilbert (git), 2021/02/09
- [PATCH 13/24] DAX: virtiofsd: Make lo_removemapping() work, Dr. David Alan Gilbert (git), 2021/02/09
- [PATCH 14/24] DAX: virtiofsd: route se down to destroy method, Dr. David Alan Gilbert (git), 2021/02/09
- [PATCH 15/24] DAX: virtiofsd: Perform an unmap on destroy,
Dr. David Alan Gilbert (git) <=
- [PATCH 19/24] DAX/unmap virtiofsd: Route unmappable reads, Dr. David Alan Gilbert (git), 2021/02/09
- [PATCH 18/24] DAX/unmap virtiofsd: Parse unmappable elements, Dr. David Alan Gilbert (git), 2021/02/09
- [PATCH 17/24] DAX/unmap virtiofsd: Add wrappers for VHOST_USER_SLAVE_FS_IO, Dr. David Alan Gilbert (git), 2021/02/09
- [PATCH 20/24] DAX/unmap virtiofsd: route unmappable write to slave command, Dr. David Alan Gilbert (git), 2021/02/09
- [PATCH 21/24] DAX:virtiofsd: implement FUSE_INIT map_alignment field, Dr. David Alan Gilbert (git), 2021/02/09
- [PATCH 22/24] vhost-user-fs: Extend VhostUserFSSlaveMsg to pass additional info, Dr. David Alan Gilbert (git), 2021/02/09