summaryrefslogtreecommitdiffstats
path: root/daemon/sync.c
Commit message (Collapse)AuthorAgeFilesLines
* daemon: Run fsync on block devices after sync (RHBZ#836710).Richard W.M. Jones2012-07-021-0/+78
| | | | | | | | | | | | | | | | | | On Linux, sync(2) does not actually issue a write barrier, thus it doesn't force a flush of the underlying hardware write cache (or qemu's disk cache in the virtual case). This can be a problem, because libguestfs relies on running sync in the appliance, followed by killing qemu (using SIGTERM). In most cases, this is fine, because killing qemu with SIGTERM should cause it to flush out the disk cache before it exits. However we have found various bugs in qemu which cause qemu to crash while doing the flush, leaving the data unwritten (see RHBZ#836913). The solution is to issue fsync(2) to the block devices. This has a write barrier, so it ensures that qemu writes out its cache long before we get around to killing qemu.
* daemon: Move internal-autosync function to new file internal.c.Richard W.M. Jones2012-01-211-18/+0
| | | | This is just code motion.
* Tempus fugit.Richard W.M. Jones2012-01-181-1/+1
| | | | Update all copyright dates to 2012.
* Update FSF address.Matthew Booth2011-11-081-1/+1
|
* daemon: Remove some less useful debugging messages.Richard W.M. Jones2011-05-081-6/+1
| | | | | | | | Remove some debug messages which were basically left over from when the code was being developed. However we leave debug messages where it is printing an external command that is about to be executed, since those are useful.
* daemon: Allow -r option to run daemon standalone.Richard W.M. Jones2011-02-031-2/+3
| | | | | | | | This changes several aspects of the daemon. Currently: * sysroot will be "" (ie. operate directly on /) * CHROOT_IN/CHROOT_OUT are disabled * autosync doesn't try to unmount everything
* Add a new internal-autosync API to perform autosync.Richard W.M. Jones2011-01-281-0/+17
| | | | | | | | | 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 internal-autosync does not do the umount-all operation.
* Tab to space (whitespace fixes only).Richard Jones2010-03-121-1/+1
|
* daemon: Fix sync() call on Unix.Richard Jones2009-11-251-1/+2
|
* sync: Windows implementation of sync() call.Richard Jones2009-11-251-1/+95
| | | | | Replace calls to sync() with calls to sync_disks() which supports Win32 via FlushFileBuffers.
* avoid warning about old-style no-param function definitionJim Meyering2009-08-171-1/+1
| | | | | * daemon/df.c (do_df, do_df_h): Add "void". * sync.c (do_sync): Likewise.
* remove trailing blanksJim Meyering2009-07-031-1/+1
|
* Added test suite.Richard Jones2009-04-111-1/+0
|
* Daemon and library are mostly talking to each other now.Richard Jones2009-04-031-0/+32