search for: do_umount_all

Displaying 20 results from an estimated 22 matches for "do_umount_all".

2015 Jul 23
2
[PATCH] daemon: Run lsof when an umount command fails in umount_all call.
Useful for debugging unmount failures. Note that we include lsof in the appliance already. --- daemon/mount.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/daemon/mount.c b/daemon/mount.c index c5b7d89..e139482 100644 --- a/daemon/mount.c +++ b/daemon/mount.c @@ -424,6 +424,10 @@ do_umount_all (void) r = command (NULL, &err, str_umount, mounts.argv[i], NULL); if (r == -1) { reply_with_error ("umount: %s: %s", mounts.argv[i], err); + if (verbose) { + /* Try running lsof to see what is holding the mountpoint open. */ + command (NULL, NULL,...
2015 Jul 23
1
Re: [PATCH] daemon: Run lsof when an umount command fails in umount_all call.
...already. > > --- > > daemon/mount.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/daemon/mount.c b/daemon/mount.c > > index c5b7d89..e139482 100644 > > --- a/daemon/mount.c > > +++ b/daemon/mount.c > > @@ -424,6 +424,10 @@ do_umount_all (void) > > r = command (NULL, &err, str_umount, mounts.argv[i], NULL); > > if (r == -1) { > > reply_with_error ("umount: %s: %s", mounts.argv[i], err); > > + if (verbose) { > > + /* Try running lsof to see what is holding the...
2015 Jul 23
0
Re: [PATCH] daemon: Run lsof when an umount command fails in umount_all call.
...e that we include lsof in > the appliance already. > --- > daemon/mount.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/daemon/mount.c b/daemon/mount.c > index c5b7d89..e139482 100644 > --- a/daemon/mount.c > +++ b/daemon/mount.c > @@ -424,6 +424,10 @@ do_umount_all (void) > r = command (NULL, &err, str_umount, mounts.argv[i], NULL); > if (r == -1) { > reply_with_error ("umount: %s: %s", mounts.argv[i], err); > + if (verbose) { > + /* Try running lsof to see what is holding the mountpoint open. */ >...
2015 Jul 23
1
[PATCH] daemon: umount-all: Give a "second chance" for temporary umount failures (RHBZ#1246032).
...ounted and synchronized properly by the time umount-all returns. --- daemon/mount.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/daemon/mount.c b/daemon/mount.c index c5b7d89..a076305 100644 --- a/daemon/mount.c +++ b/daemon/mount.c @@ -419,13 +419,20 @@ do_umount_all (void) /* Unmount them. */ for (i = 0; i < mounts.size; ++i) { - CLEANUP_FREE char *err = NULL; - - r = command (NULL, &err, str_umount, mounts.argv[i], NULL); + /* To avoid problems caused by temporary failures, such as a udev + * operation still completing, allow a sec...
2016 Jul 07
0
[PATCH 2/2] daemon: fix cleanup of stringsbuf usages
....size); + if (r == -1) return NULL; - } if (r == 1) { free (ret.argv[i]); ret.argv[i] = canonical; @@ -323,7 +321,7 @@ mounts_or_mountpoints (int mp) } } - return ret.argv; + return take_stringsbuf (&ret); } char ** @@ -363,7 +361,7 @@ do_umount_all (void) { FILE *fp; struct mntent *m; - DECLARE_STRINGSBUF (mounts); + CLEANUP_FREE_STRINGSBUF DECLARE_STRINGSBUF (mounts); size_t i; int r; @@ -417,13 +415,10 @@ do_umount_all (void) r = command (NULL, &err, str_umount, mounts.argv[i], NULL); if (r == -1) { rep...
2016 Jul 07
2
[PATCH 1/2] daemon: free the string on stringsbuf add failure
If add_string_nodup fails free the passed string instead of leaking it, as that string would have been owned by the stringbuf. Adapt few places to this behaviour. --- daemon/btrfs.c | 4 +--- daemon/devsparts.c | 8 ++++---- daemon/guestfsd.c | 1 + 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 9b52aa8..d70565a 100644 ---
2012 Mar 13
2
[PATCH 0/2] 'int' to 'size_t' changes
These two patches are probably not completely independent, but separating them is a lot of work. With *both* patches applied, all the tests and extra-tests pass. That's no guarantee however that there isn't a mistake, so I don't think this patch is a candidate for the 1.16 branch, until it's had a lot more testing in development. Rich.
2020 Mar 09
4
[PATCH v3 0/3] Switch augeas APIs to OCaml
This reimplements the augeas APIs using ocaml-augeas (dropping all the C code). The behaviour seems unchanged, although I may have not tested all the various corner cases. Changes from v2: - dropped patch #1, as it was applied already (was a real bugfix) - rebased on master Pino Toscano (3): Revert "Revert "daemon: implement OptString for OCaml APIs"" daemon: move augeas
2020 Jan 09
5
[PATCH v2 0/4] Switch augeas APIs to OCaml
This reimplements the augeas APIs using ocaml-augeas (dropping all the C code). The behaviour seems unchanged, although I may have not tested all the various corner cases. Pino Toscano (4): daemon: fix/enhance error reporting of Augeas exceptions Revert "Revert "daemon: implement OptString for OCaml APIs"" daemon: move augeas APIs to OCaml daemon: drop usage of C
2019 May 30
5
[PATCH 0/5] RFC: switch augeas APIs to OCaml
This synchronizes the embedded ocaml-augeas copy, and reimplements the augeas APIs using it (dropping all the C code). The behaviour seems unchanged, although I may have not tested all the various corner cases. Pino Toscano (5): common/mlaugeas: Synchronize with latest ocaml-augeas daemon: fix/enhance error reporting of Augeas exceptions Revert "Revert "daemon: implement
2012 Aug 30
2
[PATCH v2] daemon: collect list of called external commands
...@ -213,7 +216,7 @@ do_umount (const char *pathordevice, /* Use the external /bin/umount program, so that /etc/mtab is kept * updated. */ - ADD_ARG (argv, i, "umount"); + ADD_ARG (argv, i, str_umount); if (force) ADD_ARG (argv, i, "-f"); @@ -382,7 +385,7 @@ do_umount_all (void) /* Unmount them. */ for (i = 0; i < mounts.size; ++i) { - r = command (NULL, &err, "umount", mounts.argv[i], NULL); + r = command (NULL, &err, str_umount, mounts.argv[i], NULL); if (r == -1) { reply_with_error ("umount: %s: %s", mounts...
2012 Aug 30
1
[PATCH] collect list of called external commands
...@ -213,7 +216,7 @@ do_umount (const char *pathordevice, /* Use the external /bin/umount program, so that /etc/mtab is kept * updated. */ - ADD_ARG (argv, i, "umount"); + ADD_ARG (argv, i, str_umount); if (force) ADD_ARG (argv, i, "-f"); @@ -382,7 +385,7 @@ do_umount_all (void) /* Unmount them. */ for (i = 0; i < mounts.size; ++i) { - r = command (NULL, &err, "umount", mounts.argv[i], NULL); + r = command (NULL, &err, str_umount, mounts.argv[i], NULL); if (r == -1) { reply_with_error ("umount: %s: %s", mounts...
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
...n", "/proc/mounts"); - exit (EXIT_FAILURE); - } + if (fp == NULL) + error (EXIT_FAILURE, errno, "setmntent: %s", "/proc/mounts"); while ((m = getmntent (fp)) != NULL) { /* Allow a mount directory like "/sysroot". */ @@ -383,10 +379,8 @@ do_umount_all (void) * that requires custom parsing code. */ fp = setmntent ("/proc/mounts", "r"); - if (fp == NULL) { - fprintf (stderr, "setmntent: %s: %m\n", "/proc/mounts"); - exit (EXIT_FAILURE); - } + if (fp == NULL) + error (EXIT_FAILURE, errn...
2013 Aug 24
46
[PATCH 00/46] Proposed patches for libguestfs 1.20.11.
Tested with 'make check-release'. tests/parallel (in check-slow) failed, although it does regularly and that seems to be because of libvirt. Rich.
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...@ -238,7 +235,7 @@ do_umount (const char *pathordevice, /* Use the external /bin/umount program, so that /etc/mtab is kept * updated. */ - ADD_ARG (argv, i, str_umount); + ADD_ARG (argv, i, "umount"); if (force) ADD_ARG (argv, i, "-f"); @@ -412,7 +409,7 @@ do_umount_all (void) for (i = 0; i < mounts.size; ++i) { CLEANUP_FREE char *err = NULL; - r = command (NULL, &err, str_umount, mounts.argv[i], NULL); + r = command (NULL, &err, "umount", mounts.argv[i], NULL); if (r == -1) { reply_with_error ("umount: %s: %s&...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...@ -238,7 +237,7 @@ do_umount (const char *pathordevice, /* Use the external /bin/umount program, so that /etc/mtab is kept * updated. */ - ADD_ARG (argv, i, str_umount); + ADD_ARG (argv, i, "umount"); if (force) ADD_ARG (argv, i, "-f"); @@ -412,7 +411,7 @@ do_umount_all (void) for (i = 0; i < mounts.size; ++i) { CLEANUP_FREE char *err = NULL; - r = command (NULL, &err, str_umount, mounts.argv[i], NULL); + r = command (NULL, &err, "umount", mounts.argv[i], NULL); if (r == -1) { reply_with_error ("umount: %s: %s&...
2017 Jul 27
3
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
This is a simpler patch that removes GUESTFSD_EXT_CMD completely.
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
Wherever we had code which did: if (something_bad) { perror (...); exit (EXIT_FAILURE); } replace this with use of the error(3) function: if (something_bad) error (EXIT_FAILURE, errno, ...); The error(3) function is supplied by glibc, or by gnulib on platforms which don't have it, and is much more flexible than perror(3). Since we already use error(3), there seems to be
2017 Jul 24
6
[PATCH 0/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
Replace GUESTFSD_EXT_CMD with a command line option ‘./guestfsd --print-external-commands’
2009 Aug 12
23
[PATCH 0/23] factor and const-correctness
This started as a simple warning-elimination change. I'll get back to that series shortly ;-) It turned into a factorization and constification exercise during which I got a taste of ocaml. Thanks to Rich Jones for help with a few snippets in generator.ml. The overall result is that many previously-manually-maintained bits from daemon/*.c functions are now hoisted into the automatically-