search for: stat_filename

Displaying 5 results from an estimated 5 matches for "stat_filename".

2017 Sep 12
0
[PATCH v3 4/6] lib: qemu: Allow parallel qemu binaries to be used with cache conflicts.
...ta cached by previous versions of * libguestfs. */ -#define MEMO_GENERATION 2 +#define MEMO_GENERATION 3 /** * Test that the qemu binary (or wrapper) runs, and do C<qemu -help> @@ -147,7 +148,7 @@ guestfs_int_test_qemu (guestfs_h *g) data = safe_calloc (g, 1, sizeof *data); - stat_filename = safe_asprintf (g, "%s/qemu.stat", cachedir); + stat_filename = cache_filename (g, cachedir, &statbuf, "stat"); r = read_cache_qemu_stat (g, data, stat_filename); if (r == -1) goto error; @@ -163,7 +164,7 @@ guestfs_int_test_qemu (guestfs_h *g) for (i = 0;...
2017 Sep 12
0
[PATCH v2 2/5] lib: qemu: Factor out common code for reading and writing cache files.
...t change, calling this is effectively free. @@ -73,12 +110,12 @@ static void read_all (guestfs_h *g, void *retv, const char *buf, size_t len); struct qemu_data * guestfs_int_test_qemu (guestfs_h *g) { - struct qemu_data *data; struct stat statbuf; - CLEANUP_FREE char *cachedir = NULL, *qemu_stat_filename = NULL, - *qemu_help_filename = NULL, *qemu_devices_filename = NULL; - int generation; - uint64_t prev_size, prev_mtime; + struct qemu_data *data; + CLEANUP_FREE char *cachedir = NULL; + CLEANUP_FREE char *stat_filename = NULL; + int r; + size_t i; if (stat (g->hv, &statbuf) =...
2017 Sep 12
8
[PATCH v3 0/6] launch: direct: Disable qemu locking when opening drives readonly.
v2 -> v3: - I addressed everything that Pino mentioned last time. - It's tricky to get a stable run when multiple copies of qemu are involved, because the same cache files get overwritten by parallel libguestfs. So I changed the names of the cache files to include the qemu binary key (size, mtime), which removes this conflict. This is in new patch 4/6. Rich.
2017 Sep 11
4
[PATCH 0/4] lib: qemu: Add test for mandatory locking.
The patch I posted last week to disable mandatory locking for readonly drives (https://www.redhat.com/archives/libguestfs/2017-September/msg00013.html) was wrong in a couple of respects. Firstly it didn't work, which I didn't detect because my tests were testing the wrong thing. Oops. Secondly it used a simple version number check to detect qemu binaries implementing mandatory locking.
2017 Sep 12
9
[PATCH v2 0/5] launch: direct: Disable qemu locking when opening drives readonly (RHBZ#1417306)
Patches 1-4 are almost the same as they are when previously posted here: https://www.redhat.com/archives/libguestfs/2017-September/msg00039.html Patch 5 actually uses the mandatory locking test to turn off locking in the narrow case where a drive is opened readonly, and then only for the drive being inspected. Passes ordinary tests (‘check-direct’ and ‘check-valgrind-direct’). Rich.