summaryrefslogtreecommitdiffstats
path: root/fuse/guestmount.pod
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-07-09 15:23:52 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-07-09 15:23:52 +0100
commit1cde66165aac222f1a07ad4c3873c61d49eabb02 (patch)
tree3f83b4205548e94cb53a8ac3331fbd6df44c3e81 /fuse/guestmount.pod
parentb749dc70742e749dbd7c0c20e6e7191fdd199170 (diff)
downloadlibguestfs-1cde66165aac222f1a07ad4c3873c61d49eabb02.tar.gz
libguestfs-1cde66165aac222f1a07ad4c3873c61d49eabb02.tar.xz
libguestfs-1cde66165aac222f1a07ad4c3873c61d49eabb02.zip
fuse: Document race condition possible with fusermount.
See also: https://bugzilla.redhat.com/show_bug.cgi?id=835466#c9
Diffstat (limited to 'fuse/guestmount.pod')
-rw-r--r--fuse/guestmount.pod16
1 files changed, 16 insertions, 0 deletions
diff --git a/fuse/guestmount.pod b/fuse/guestmount.pod
index a0bc6f14..c37301c9 100644
--- a/fuse/guestmount.pod
+++ b/fuse/guestmount.pod
@@ -106,6 +106,22 @@ namespace using the Linux-specific L<clone(2)>/L<unshare(2)> flag
C<CLONE_NEWNS>. Unfortunately at the moment this requires root and we
would also probably need to add it as a feature to guestmount.
+=head2 Race conditions possible when shutting down the connection
+
+When C<fusermount -u> exits, guestmount may still be running and
+cleaning up the mountpoint. The disk image will not be fully
+finalized.
+
+This means that scripts like the following have a nasty race
+condition:
+
+ guestmount -a disk.img -i /mnt
+ # copy things into /mnt
+ fusermount -u /mnt
+ # immediately try to use 'disk.img' <-- UNSAFE
+
+The solution is to spin waiting for the guestmount process to exit.
+
=head1 OPTIONS
=over 4