diff options
author | Richard Jones <rjones@redhat.com> | 2010-02-09 18:00:24 +0000 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2010-02-10 10:46:23 +0000 |
commit | f93cbe5756cf052cce8049087afdcf714a3fc70c (patch) | |
tree | c8caeeeb48f4293aa3aa7781fa3ae013b146728a /perl | |
parent | 245ac5673700f54479e9408e8659cb68f80c344a (diff) | |
download | libguestfs-f93cbe5756cf052cce8049087afdcf714a3fc70c.tar.gz libguestfs-f93cbe5756cf052cce8049087afdcf714a3fc70c.tar.xz libguestfs-f93cbe5756cf052cce8049087afdcf714a3fc70c.zip |
Use mount-options instead of mount to avoid implicit -o sync.
guestfs_mount adds -o sync implicitly. This causes a very large
performance problem for write-intensive programs (eg. virt-v2v).
Document this as a "gotcha".
Change the tests, guestfish, Sys::Guestfs::Lib, guestmount to use
mount-options instead.
(Note that this gotcha does not affect mount-ro).
The source of the performance problem was first identified by
Matthew Booth.
Diffstat (limited to 'perl')
-rw-r--r-- | perl/lib/Sys/Guestfs/Lib.pm | 2 | ||||
-rw-r--r-- | perl/t/060-readdir.t | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/perl/lib/Sys/Guestfs/Lib.pm b/perl/lib/Sys/Guestfs/Lib.pm index 49c08b39..21c9a64c 100644 --- a/perl/lib/Sys/Guestfs/Lib.pm +++ b/perl/lib/Sys/Guestfs/Lib.pm @@ -1282,7 +1282,7 @@ sub mount_operating_system if($ro) { $g->mount_ro ($mounts->{$_}, $_) } else { - $g->mount ($mounts->{$_}, $_) + $g->mount_options ("", $mounts->{$_}, $_) } } } diff --git a/perl/t/060-readdir.t b/perl/t/060-readdir.t index 5ed5b7ac..dc8278b3 100644 --- a/perl/t/060-readdir.t +++ b/perl/t/060-readdir.t @@ -38,7 +38,7 @@ $h->part_disk ("/dev/sda", "mbr"); ok (1); $h->mkfs ("ext2", "/dev/sda1"); ok (1); -$h->mount ("/dev/sda1", "/"); +$h->mount_options ("", "/dev/sda1", "/"); ok (1); $h->mkdir ("/p"); ok (1); |