qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] block/nfs: add support for nfs_umount
@ 2019-09-03 13:44 Peter Lieven
  2019-09-03 14:56 ` Kevin Wolf
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Lieven @ 2019-09-03 13:44 UTC (permalink / raw)
  To: qemu-block; +Cc: kwolf, Peter Lieven, qemu-devel, ronniesahlberg, mreitz

libnfs recently added support for unmounting. Add support
in Qemu too.

Signed-off-by: Peter Lieven <pl@kamp.de>
---
 block/nfs.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/block/nfs.c b/block/nfs.c
index 0ec50953e4..9d30963fd8 100644
--- a/block/nfs.c
+++ b/block/nfs.c
@@ -1,7 +1,7 @@
 /*
  * QEMU Block driver for native access to files on NFS shares
  *
- * Copyright (c) 2014-2017 Peter Lieven <pl@kamp.de>
+ * Copyright (c) 2014-2019 Peter Lieven <pl@kamp.de>
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -394,6 +394,9 @@ static void nfs_client_close(NFSClient *client)
             nfs_close(client->context, client->fh);
             client->fh = NULL;
         }
+#ifdef LIBNFS_FEATURE_UMOUNT
+        nfs_umount(client->context);
+#endif
         aio_set_fd_handler(client->aio_context, nfs_get_fd(client->context),
                            false, NULL, NULL, NULL, NULL);
         nfs_destroy_context(client->context);
-- 
2.17.1




^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-09-05 10:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-03 13:44 [Qemu-devel] [PATCH] block/nfs: add support for nfs_umount Peter Lieven
2019-09-03 14:56 ` Kevin Wolf
2019-09-03 19:52   ` Peter Lieven
2019-09-04  9:34     ` Kevin Wolf
2019-09-05  9:43       ` Peter Lieven
2019-09-05 10:05         ` ronnie sahlberg
2019-09-05 10:16           ` Peter Lieven
2019-09-05 10:28             ` ronnie sahlberg
2019-09-05 10:32               ` Peter Lieven

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).