mount: No longer implicitly add -o sync,noatime options.

This commit is contained in:
Richard W.M. Jones
2011-10-01 08:20:50 +01:00
parent 4e9ed01847
commit 5c2f1a2d94
3 changed files with 10 additions and 10 deletions

View File

@@ -123,7 +123,7 @@ do_mount_vfs (const char *options, const char *vfstype,
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

View File

@@ -1595,15 +1595,12 @@ exist.
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"]]],

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