search for: autosync

Displaying 20 results from an estimated 56 matches for "autosync".

2011 Jan 28
0
[PATCH] Add a new internal-autosync API to perform autosync.
...ng, bindings from many languages. http://libguestfs.org -------------- next part -------------- >From d2636b0984830d950423dadd936114ff242c4a00 Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones <rjones at redhat.com> Date: Fri, 28 Jan 2011 15:28:25 +0000 Subject: [PATCH] Add a new internal-autosync API to perform autosync. Instead of explicitly calling umount-all; sync, we add a daemon function called internal-autosync which does the same. Apart from slightly simplifying the process of closing the handle, the main advantage is we can modify the daemon for the standalone case so that interna...
2015 Feb 05
1
[PATCH] perl: tests: reenable set_path tests
...l/t/060-handle-properties.t index 0057503..6b1ee42 100644 --- a/perl/t/060-handle-properties.t +++ b/perl/t/060-handle-properties.t @@ -17,7 +17,7 @@ use strict; use warnings; -use Test::More tests => 7; +use Test::More tests => 9; use Sys::Guestfs; @@ -33,13 +33,10 @@ ok ($g->get_autosync () == 1, "autosync not true"); $g->set_autosync (0); ok ($g->get_autosync () == 0, "autosync not false"); -# This probably doesn't work at the moment because -# the binding for set_path does not ensure the string -# remains around for the lifetime of the handle. -#...
2012 Jul 03
8
[PATCH 0/7 v2] Fix and workaround for qcow2 issues in qemu causing data corruption.
https://bugzilla.redhat.com/show_bug.cgi?id=836710 https://bugzilla.redhat.com/show_bug.cgi?id=836913 There are at least two related bugs going on: (1) Linux sync(2) system call doesn't send a write barrier to the disk, so in effect it doesn't force the hard disk to flush its cache. libguestfs used sync(2) to force changes to disk. We didn't expect that qemu was caching anything
2012 Mar 05
2
[PATCH] Remove call to set_autosync.
...(+), 3 deletions(-) diff --git a/lib/Sys/VirtConvert/GuestfsHandle.pm b/lib/Sys/VirtConvert/GuestfsHandle.pm index 01d7eb0..c370007 100644 --- a/lib/Sys/VirtConvert/GuestfsHandle.pm +++ b/lib/Sys/VirtConvert/GuestfsHandle.pm @@ -103,9 +103,6 @@ sub new &$open(); } - # Enable autosync to defend against data corruption on unclean shutdown - $g->set_autosync(1); - $self->{g} = $g; $self->{onclose} = []; -- 1.7.9.1
2012 Feb 23
1
[PATCH v2] Add a flag to make some functions called only at CONFIG state(RHBZ796520)
...set_append", (RErr, [OptString "append"], []), -1, [FishAlias "append"; ConfigOnly], [], "add options to kernel command line", "\ @@ -286,7 +286,7 @@ guest kernel command line. If C<NULL> then no options are added."); - ("set_autosync", (RErr, [Bool "autosync"], []), -1, [FishAlias "autosync"], + ("set_autosync", (RErr, [Bool "autosync"], []), -1, [FishAlias "autosync"; ConfigOnly], [], "set autosync mode", "\ @@ -373,7 +373,7 @@ only useful for p...
2012 Aug 04
2
[PATCH 0/2] Add support for rsync.
An experimental series that adds support for rsync. Rich.
2012 Jan 24
1
example script for GObject
I tried using Javascript (gjs) with GObject-Introspection and did a port of the create_disk example which is attached below. Quite a bit of time was spent looking up stuff in the GLib reference and guessing how certain idioms translate to gjs. I used the traditional add_drive_opts method since I haven't been able to find how to specify the optional arguments to add_drive_opts. How does that
2008 Oct 27
3
DO NOT REPLY [Bug 5854] New: --del (+old protocol?) sometimes leads to "double free" crashes
...rom the arguments, all goes smoothly. For a given file list, it always happens, or never happens. This is on a x86-64 and the other side is rsync 2.6.9, 32bits. Trying with a different host having rsync 3.0.3 64bits, it goes fine. Example: rsync --archive --recursive --del --files-from=/home/piel/.autosync/lan/list --exclude-from=/home/piel/.autosync/lan/exclude --cvs-exclude --verbose /home/piel/ 'piel@XXXXXX.st.ewi.tudelft.nl:~/backup-dutifh/' building file list ... done .bash_history .mozilla/firefox/673l4j3m.default/ .mozilla/firefox/673l4j3m.default/cookies.sqlite .mozilla/firefox/673l4...
2010 Jun 17
2
[PATCH] Improve cleanup of libguestfs handle with Sys::VirtV2V::GuestfsHandle
...r) if ($err); + + if (defined($sig_received)) { + &$sigint($sig_received) if ($sig_received eq 'INT'); + &$sigquit($sig_received) if ($sig_received eq 'QUIT'); + } + $SIG{'INT'} = $sigint; + $SIG{'QUIT'} = $sigquit; + + # Enable autosync to defend against data corruption on unclean shutdown + $g->set_autosync(1); + + $self->{g} = $g; + + $self->{onclose} = []; + + bless($self, $class); + return $self; +} + +=item add_on_close + +Register a callback to be called before closing the underlying Sys::Guestfs +han...
2012 May 02
0
[PATCH] fish: Add --pipe-error flag to allow detection of errors in pipe commands (RHBZ#803533).
...ogress_bar *bar = NULL; +static int pipe_error = 0; /* Currently open libguestfs handle. */ guestfs_h *g = NULL; @@ -126,6 +127,7 @@ usage (int status) " -m|--mount dev[:mnt[:opts]] Mount dev on mnt (if omitted, /)\n" " -n|--no-sync Don't autosync\n" " -N|--new type Create prepared disk (test1.img, ...)\n" + " --pipe-error Pipe commands can detect write errors\n" " --progress-bars Enable progress bars even when not interactive\n" &...
2012 Jan 24
1
[PATCH] Enable running the daemon under valgrind.
...valgrind_daemon" = "xyes"]) dnl Build the appliance? AC_MSG_CHECKING([if we should build the appliance]) diff --git a/src/guestfs.c b/src/guestfs.c index 31968e4..5fedf4b 100644 --- a/src/guestfs.c +++ b/src/guestfs.c @@ -190,9 +190,11 @@ guestfs_close (guestfs_h *g) if (g->autosync && g->state == READY) guestfs_internal_autosync (g); +#ifndef VALGRIND_DAEMON /* Kill the qemu subprocess. */ if (g->state != CONFIG) guestfs_kill_subprocess (g); +#endif /* Run user close callbacks. */ guestfs___call_callbacks_void (g, GUESTFS_EVENT_CLOSE);...
2013 Jan 30
1
[PATCH] Make internal-only functions and structures private
...246; - in_fish = false; in_docs = false; + in_fish = false; in_docs = false; internal = true; protocol_limit_warning = true; tests = [ InitScratchFS, Always, TestOutput ( @@ -8391,7 +8391,7 @@ See also L<guestfs(3)/RESIZE2FS ERRORS>." }; name = "internal_autosync"; style = RErr, [], []; proc_nr = Some 282; - in_fish = false; in_docs = false; + in_fish = false; in_docs = false; internal = true; shortdesc = "internal autosync operation"; longdesc = "\ This command performs the autosync operation just before the @...
2010 Nov 02
0
[ANNOUNCE] libguestfs 1.6.0 tools for accessing and modifying VM disk images
...tory usage. - OCaml users can use an alternate OO-style of coding, eg. g#launch () - The API supports calls which take optional parameters, eg. $g->add_drive_opts ("disk", readonly => 1); - Trace output now escapes and shortens large strings (thanks Matthew Booth). - Autosync is now on by default, resulting in more reliable behaviour when the handle is closed. - virt-df --uuid option allows you to follow a domain across migration and renaming. - Translations of manual pages. Security - CVE-2010-3851 libguestfs: missing disk format specifier when adding a di...
2011 Apr 29
3
running libguestfs as a service?
Hello, First off, many thanks for libguestfs... very useful! I'm trying to run libguestfs as an RPC service by using a python daemon with the python libguestfs bindings. With this service I'm "centrally" editing VM images, and often running many GuestFS() on the same image file in a short amount of time to edit the image's contents. The problem I'm running across is
2009 Sep 09
2
[PATCH] Add command trace functionality
...me error_code; pr " guestfs_set_busy (g);\n"; pr "\n"; diff --git a/src/guestfs.c b/src/guestfs.c index 571205f..98d99b8 100644 --- a/src/guestfs.c +++ b/src/guestfs.c @@ -170,6 +170,7 @@ struct guestfs_h int cmdline_size; int verbose; + int trace; int autosync; char *path; /* Path to kernel, initrd. */ @@ -238,6 +239,9 @@ guestfs_create (void) str = getenv ("LIBGUESTFS_DEBUG"); g->verbose = str != NULL && strcmp (str, "1") == 0; + str = getenv ("LIBGUESTFS_TRACE"); + g->trace = str != NULL &amp...
2015 Jun 25
0
[PATCH v2 1/9] build: Remove ./configure --enable-valgrind-daemon.
...ult and minimum memory size for most users. */ #ifndef DEFAULT_MEMSIZE # define DEFAULT_MEMSIZE 500 diff --git a/src/handle.c b/src/handle.c index 51b9572..b15a15d 100644 --- a/src/handle.c +++ b/src/handle.c @@ -426,21 +426,6 @@ shutdown_backend (guestfs_h *g, int check_for_errors) if (g->autosync && g->state == READY) { if (guestfs_internal_autosync (g) == -1) ret = -1; -#ifdef VALGRIND_DAEMON - /* When valgrinding the daemon, this causes the daemon to exit - * properly, so we'll see any valgrind problems. Don't do this in - * production builds bec...
2012 Jul 09
4
[PATCH 0/4] Provide guestmount --pid-file and document possible race when unmounting FUSE filesystems.
The full description of this bug is here: https://bugzilla.redhat.com/show_bug.cgi?id=838592 and the effect it has on OpenStack is described here: https://bugzilla.redhat.com/show_bug.cgi?id=835466#c9 Rich.
2015 Sep 29
1
[PATCH] [repost] build: Remove ./configure --enable-valgrind-daemon.
Previously posted here: https://www.redhat.com/archives/libguestfs/2015-June/msg00266.html Rich.
2010 Aug 28
4
[PATCH 0/4] Add progress bars
As discussed previously: https://www.redhat.com/archives/libguestfs/2010-July/msg00003.html https://www.redhat.com/archives/libguestfs/2010-July/msg00024.html To do: (1) Implement progress notifications for many more daemon operations. (2) OCaml bindings to the callback. (3) Perl bindings to the callback. Rich. -- Richard Jones, Virtualization Group, Red Hat
2013 Feb 04
1
[PATCH] generator: Add visibility to action struct
..._nr = Some 246; - in_fish = false; in_docs = false; internal = true; + visibility = VInternal; protocol_limit_warning = true; tests = [ InitScratchFS, Always, TestOutput ( @@ -8391,7 +8397,7 @@ See also L<guestfs(3)/RESIZE2FS ERRORS>." }; name = "internal_autosync"; style = RErr, [], []; proc_nr = Some 282; - in_fish = false; in_docs = false; internal = true; + visibility = VInternal; shortdesc = "internal autosync operation"; longdesc = "\ This command performs the autosync operation just before the @@ -8537,7...