search for: map_md_devices

Displaying 20 results from an estimated 26 matches for "map_md_devices".

2018 Sep 11
1
[PATCH] daemon: consider /etc/mdadm/mdadm.conf while inspecting mountpoints.
...untable os_type) and check_fstab_aug mdadm_conf root_mountable os_type aug = - (* Generate a map of MD device paths listed in /etc/mdadm.conf + (* Generate a map of MD device paths listed in mdadm.conf * to MD device paths in the guestfs appliance. *) let md_map = if mdadm_conf then map_md_devices aug else StringMap.empty in @@ -224,11 +225,13 @@ and map_md_devices aug = if StringMap.is_empty uuid_map then StringMap.empty else ( (* Get all arrays listed in mdadm.conf. *) - let entries = aug_matches_noerrors aug "/files/etc/mdadm.conf/array" in + let entries1 = aug_...
2012 Apr 17
1
[PATCH] Don't abort inspection if mdadm.conf ARRAY doesn't have a uuid
--- src/inspect_fs_unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inspect_fs_unix.c b/src/inspect_fs_unix.c index 1ef4ca4..5695adc 100644 --- a/src/inspect_fs_unix.c +++ b/src/inspect_fs_unix.c @@ -1113,7 +1113,7 @@ map_md_devices(guestfs_h *g, Hash_table **map) free(uuid_path); if (!uuid) { free(dev); - goto error; + continue; } /* Parse the uuid into an md_uuid structure so we can look it up in the -- 1.7.10
2012 Sep 20
1
[PATCH] rename local variable to avoid clash with match macro
...h will expand to guestfs___match, rename the local variable to avoid clash. Signed-off-by: Olaf Hering <olaf at aepfle.de> diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c index 06ff96d..c30ad5a 100644 --- a/src/inspect-fs-unix.c +++ b/src/inspect-fs-unix.c @@ -1128,14 +1128,14 @@ map_md_devices(guestfs_h *g, Hash_table **map) mdadm_app_free); if (!*map) g->abort_cb(); - for (char **match = matches; *match != NULL; match++) { + for (char **_match = matches; *_match != NULL; _match++) { /* Get device name and uuid for each array */ - cha...
2011 Nov 22
2
[PATCH] inspection: Handle MD devices in fstab
This patch fixes inspection when fstab contains devices md devices specified as /dev/mdN. The appliance creates these devices without reference to the guest's mdadm.conf so, for e.g. /dev/md0 in the guest will often be created as /dev/md127 in the appliance. With this patch, we match the uuids of detected md devices against uuids specified in mdadm.conf, and map them appropriately when we
2013 Jan 25
4
[PATCH 0/3] Use __attribute__((cleanup(...)))
This patch series changes a small part of the library to use __attribute__((cleanup(...))) to automatically free memory when pointers go out of the current scope. In general terms this seems to be a small win although you do have to use it carefully. For functions where you can completely get rid of the "exit code paths", it can simplify things. For a good example, see the
2011 Nov 24
2
[PATCH] NFC: Cleanup iteration over fstab entries in inspect_fs_unix.c
...re_scientific_linux); pcre_free (re_scientific_linux_no_minor); pcre_free (re_major_minor); - pcre_free (re_aug_seq); pcre_free (re_xdev); pcre_free (re_cciss); pcre_free (re_mdN); @@ -725,47 +723,43 @@ check_fstab (guestfs_h *g, struct inspect_fs *fs) Hash_table *md_map; if (!map_md_devices (g, &md_map)) return -1; - char **lines = guestfs_aug_ls (g, "/files/etc/fstab"); - if (lines == NULL) goto error; + char *augpath = NULL; + char **entries = guestfs_aug_match (g, "/files/etc/fstab/*" + "[label() != '#co...
2011 Dec 01
2
[PATCH 0/2] handle MD devices in fstab
Only change from previous post is explicitly checking md_map for NULL before hash_free and lookup.
2011 Nov 25
2
[PATCH 0/2] MD device inspection
These patches are rebased on top of current master. In addition, I've made the following changes: * Fixed whitespace error. * Functions return -1 on error. * Added a debug message when guest contains md devices, but nothing was parsed from mdadm.conf.
2011 Dec 02
3
[PATCH 1/3] build: Add more suppressions for valgrind tests
--- extratests/suppressions | 20 ++++++++++++++++---- 1 files changed, 16 insertions(+), 4 deletions(-) diff --git a/extratests/suppressions b/extratests/suppressions index 97d4b78..78ca4ab 100644 --- a/extratests/suppressions +++ b/extratests/suppressions @@ -3,19 +3,19 @@ Memcheck:Cond fun:* fun:numa_node_size64 - fun:numa_init + obj:/usr/lib64/libnuma.so.1 } {
2015 Mar 16
0
[PATCH] inspection: add support for systemd .mount files
...e *md_map = NULL; + bool is_bsd = (fs->type == OS_TYPE_FREEBSD || + fs->type == OS_TYPE_NETBSD || + fs->type == OS_TYPE_OPENBSD); + + /* Generate a map of MD device paths listed in /etc/mdadm.conf to MD device + * paths in the guestfs appliance */ + if (map_md_devices (g, &md_map) == -1) { + printf ("map_md_dev fail\n"); + return -1; + } + + char expr[512]; + snprintf (expr, sizeof expr, "/files%s", fname); + entries = guestfs_aug_match (g, expr); + if (entries == NULL) { + return 0; + } + + for (entry = entries; *entry !=...
2015 Mar 16
2
[PATCH] RFE: Inspection should support systemd mount units
Adds support for systemd .mount files, uses Augeas to extract mount points. Fixes RHBZ#1113153. Maros Zatko (1): inspection: add support for systemd .mount files src/inspect-fs-unix.c | 240 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 240 insertions(+) -- 1.9.3
2011 Nov 23
8
[PATCH 0/8] Add MD inspection support to libguestfs
This series fixes inspection in the case that fstab contains references to md devices. I've made a few changes since the previous posting, which I've summarised below. [PATCH 1/8] build: Create an MD variant of the dummy Fedora image I've double checked that no timestamp is required in the Makefile. The script will not run a second time to build fedora-md2.img. [PATCH 2/8] build:
2015 Oct 05
0
[PATCH 2/2] Fix whitespace.
...ve the same uuid", + ((md_uuid *)matched)->path, entry->path); + md_uuid_free(entry); + break; - default: - n++; + default: + n++; } } } return n; -error: + error: hash_free (*map); *map = NULL; return -1; @@ -1612,12 +1612,12 @@ map_md_devices(guestfs_h *g, Hash_table **map) /* Log a debug message if we've got md devices, but nothing in mdadm.conf */ if (matches[0] == NULL) { debug(g, "Appliance has MD devices, but augeas returned no array matches " - "in mdadm.conf"); + "in mdadm.con...
2017 Aug 09
0
[PATCH v12 09/11] daemon: Implement inspection of Linux and other Unix-like operating systems.
...configfiles (check_fstab_aug mdadm_conf root_mountable os_type) + +and check_fstab_aug mdadm_conf root_mountable os_type aug = + (* Generate a map of MD device paths listed in /etc/mdadm.conf + * to MD device paths in the guestfs appliance. + *) + let md_map = if mdadm_conf then map_md_devices aug else StringMap.empty in + + let path = "/files/etc/fstab/*[label() != '#comment']" in + let entries = aug_matches_noerrors aug path in + filter_map (check_fstab_entry md_map root_mountable os_type aug) entries + +and check_fstab_entry md_map root_mountable os_type aug entry...
2017 Jul 31
0
[PATCH v11 08/10] daemon: Implement inspection of Linux and other Unix-like operating systems.
...configfiles (check_fstab_aug mdadm_conf root_mountable os_type) + +and check_fstab_aug mdadm_conf root_mountable os_type aug = + (* Generate a map of MD device paths listed in /etc/mdadm.conf + * to MD device paths in the guestfs appliance. + *) + let md_map = if mdadm_conf then map_md_devices aug else StringMap.empty in + + let path = "/files/etc/fstab/*[label() != '#comment']" in + let entries = aug_matches_noerrors aug path in + filter_map (check_fstab_entry md_map root_mountable os_type aug) entries + +and check_fstab_entry md_map root_mountable os_type aug entry...
2015 Oct 05
3
[PATCH 1/2] Change 'fprintf (stdout,...)' -> printf.
Result of earlier copy and paste. --- align/scan.c | 35 ++++++++++--------- cat/cat.c | 39 +++++++++++---------- cat/filesystems.c | 69 +++++++++++++++++++------------------- cat/log.c | 35 ++++++++++--------- cat/ls.c | 61 +++++++++++++++++---------------- df/main.c | 43 ++++++++++++------------ diff/diff.c | 67
2013 Feb 12
7
Remaining btrfs patches
[PATCH 1/7] mount: Add mount_vfs_nochroot This is significantly reworked from before. umount is gone as discussed, and variable motion is minimised. [PATCH 2/7] btrfs: Update btrfs_subvolume_list to take Already provisionally ACKed. Previous comment was that cleanup could be tidier. I looked into creating a new cleanup function for fs_buf, but it isn't possible (or simple, anyway) in this
2017 Jun 12
1
[PATCH] UNFINISHED daemon: Reimplement most inspection APIs in the daemon.
This is the (incomplete) patch which reimplements inspection APIs in the daemon. All ‘XXX’s in this patch indicate areas which are not yet implemented or need further work. Rich.
2017 Jul 21
10
[PATCH v10 00/10] Reimplement inspection in the daemon.
v9 was here: https://www.redhat.com/archives/libguestfs/2017-July/msg00139.html This depends on these three series (the first two being single minor patches): https://www.redhat.com/archives/libguestfs/2017-July/msg00207.html https://www.redhat.com/archives/libguestfs/2017-July/msg00209.html https://www.redhat.com/archives/libguestfs/2017-July/msg00215.html There is no substantive change. I
2017 Jul 17
12
[PATCH v9 00/11] Reimplement inspection in the daemon.
This depends on the patch series "[PATCH 00/27] Reimplement many daemon APIs in OCaml." (https://www.redhat.com/archives/libguestfs/2017-July/msg00098.html) v8 was posted here: https://www.redhat.com/archives/libguestfs/2017-June/msg00274.html v9: - I split up the mega-patch into a more reviewable series of smaller, incremental patches. There are some other changes vs v8, but