mount: No longer implicitly add -o sync,noatime options.
authorRichard W.M. Jones <rjones@redhat.com>
Sat, 1 Oct 2011 07:20:50 +0000 (08:20 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Sat, 1 Oct 2011 07:20:50 +0000 (08:20 +0100)
daemon/mount.c
generator/generator_actions.ml
src/guestfs.pod

index be289da..ab43c20 100644 (file)
@@ -123,7 +123,7 @@ do_mount_vfs (const char *options, const char *vfstype,
 int
 do_mount (const char *device, const char *mountpoint)
 {
 int
 do_mount (const char *device, const char *mountpoint)
 {
-  return do_mount_vfs ("sync,noatime", NULL, device, mountpoint);
+  return do_mount_vfs ("", NULL, device, mountpoint);
 }
 
 int
 }
 
 int
index 8d03275..4914687 100644 (file)
@@ -1595,15 +1595,12 @@ exist.
 The mounted filesystem is writable, if we have sufficient permissions
 on the underlying device.
 
 The mounted filesystem is writable, if we have sufficient permissions
 on the underlying device.
 
-B<Important note:>
-When you use this call, the filesystem options C<sync> and C<noatime>
-are set implicitly.  This was originally done because we thought it
-would improve reliability, but it turns out that I<-o sync> has a
-very large negative performance impact and negligible effect on
-reliability.  Therefore we recommend that you avoid using
-C<guestfs_mount> in any code that needs performance, and instead
-use C<guestfs_mount_options> (use an empty string for the first
-parameter if you don't want any options).");
+Before libguestfs 1.13.16, this call implicitly added the options
+C<sync> and C<noatime>.  The C<sync> option greatly slowed
+writes and caused many problems for users.  If your program
+might need to work with older versions of libguestfs, use
+C<guestfs_mount_options> instead (using an empty string for the
+first parameter if you don't want any options).");
 
   ("sync", (RErr, [], []), 2, [],
    [ InitEmpty, Always, TestRun [["sync"]]],
 
   ("sync", (RErr, [], []), 2, [],
    [ InitEmpty, Always, TestRun [["sync"]]],
index 7580498..b87a997 100644 (file)
@@ -802,6 +802,9 @@ can make this very puzzling if you are trying to debug a problem.
 
 =item Mount option C<-o sync> should not be the default.
 
 
 =item Mount option C<-o sync> should not be the default.
 
+I<Update:> L</guestfs_mount> no longer adds any options starting
+from libguestfs 1.13.16.  This section only applies to older versions.
+
 If you use L</guestfs_mount>, then C<-o sync,noatime> are added
 implicitly.  However C<-o sync> does not add any reliability benefit,
 but does have a very large performance impact.
 If you use L</guestfs_mount>, then C<-o sync,noatime> are added
 implicitly.  However C<-o sync> does not add any reliability benefit,
 but does have a very large performance impact.