Displaying 20 results from an estimated 42 matches for "str_umount".
Did you mean:
str_mount
2014 Dec 11
1
Re: [PATCH v2 01/11] daemon: btrfs: add helper functions mount and umount
..._buf);
> + return NULL;
> + }
> + }
> +
> + return fs_buf;
> +}
> +
> +static int
> +umount (char *fs_buf, const mountable_t *fs)
> +{
> + if (fs->type != MOUNTABLE_PATH) {
> + CLEANUP_FREE char *err = NULL;
> + if (command (NULL, &err, str_umount, fs_buf, NULL) == -1) {
> + reply_with_error ("%s", err ? err : "malloc");
> + return -1;
> + }
> +
> + if (rmdir (fs_buf) == -1 && errno != ENOENT) {
> + reply_with_error ("rmdir: %m\n");
> + return -1;
> +...
2015 Jul 23
1
[PATCH] daemon: umount-all: Give a "second chance" for temporary umount failures (RHBZ#1246032).
...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 second chance for each umount.
+ */
+ r = command (NULL, NULL, str_umount, mounts.argv[i], NULL);
if (r == -1) {
- reply_with_error ("umou...
2014 Dec 12
0
[PATCH v3 01/11] daemon: btrfs: add helper functions mount and umount
...reply_with_error ("rmdir: %m\n");
+ free (fs_buf);
+ return NULL;
+ }
+ }
+
+ return fs_buf;
+}
+
+static int
+umount (char *fs_buf, const mountable_t *fs)
+{
+ if (fs->type != MOUNTABLE_PATH) {
+ CLEANUP_FREE char *err = NULL;
+ if (command (NULL, &err, str_umount, fs_buf, NULL) == -1) {
+ reply_with_error ("%s", err ? err : "malloc");
+ return -1;
+ }
+
+ if (rmdir (fs_buf) == -1 && errno != ENOENT) {
+ reply_with_error ("rmdir: %m\n");
+ return -1;
+ }
+ }
+ free (fs_buf);
+ return 0;
+}...
2014 Dec 11
0
[PATCH v2 01/11] daemon: btrfs: add helper functions mount and umount
...fprintf (stderr, "rmdir: %m\n");
+ free (fs_buf);
+ return NULL;
+ }
+ }
+
+ return fs_buf;
+}
+
+static int
+umount (char *fs_buf, const mountable_t *fs)
+{
+ if (fs->type != MOUNTABLE_PATH) {
+ CLEANUP_FREE char *err = NULL;
+ if (command (NULL, &err, str_umount, fs_buf, NULL) == -1) {
+ reply_with_error ("%s", err ? err : "malloc");
+ return -1;
+ }
+
+ if (rmdir (fs_buf) == -1 && errno != ENOENT) {
+ reply_with_error ("rmdir: %m\n");
+ return -1;
+ }
+ }
+ free (fs_buf);
+ return 0;
+}...
2015 Jul 23
2
[PATCH] daemon: Run lsof when an umount command fails in umount_all call.
...t 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, "lsof", mounts.argv[i], NULL);
+ }...
2015 Jul 23
1
Re: [PATCH] daemon: Run lsof when an umount command fails in umount_all call.
...t; 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, &q...
2015 Jun 04
3
[PATCH RFC][Resend] New API: btrfs_convert
...| 18 ++++++++++++++++++
2 files changed, 47 insertions(+)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index 39392f7..fd679cf 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -38,6 +38,7 @@ GUESTFSD_EXT_CMD(str_btrfsck, btrfsck);
GUESTFSD_EXT_CMD(str_mkfs_btrfs, mkfs.btrfs);
GUESTFSD_EXT_CMD(str_umount, umount);
GUESTFSD_EXT_CMD(str_btrfsimage, btrfs-image);
+GUESTFSD_EXT_CMD(str_btrfsconvert, btrfs-convert);
int
optgroup_btrfs_available (void)
@@ -2083,3 +2084,31 @@ do_btrfs_image (char *const *sources, const char *image,
return 0;
}
+
+int
+do_btrfs_convert (const char *device, int r...
2016 Jan 21
0
[PATCH v3 1/6] daemon: Rename daemon/command.c -> daemon/sh.c.
...stat.h>
-#include <sys/types.h>
-#include <fcntl.h>
-
-#include "guestfs_protocol.h"
-#include "daemon.h"
-#include "actions.h"
-
-#include "ignore-value.h"
-
-GUESTFSD_EXT_CMD(str_cp, cp);
-GUESTFSD_EXT_CMD(str_mount, mount);
-GUESTFSD_EXT_CMD(str_umount, umount);
-
-#ifdef HAVE_ATTRIBUTE_CLEANUP
-#define CLEANUP_BIND_STATE __attribute__((cleanup(free_bind_state)))
-#define CLEANUP_RESOLVER_STATE __attribute__((cleanup(free_resolver_state)))
-#else
-#define CLEANUP_BIND_STATE
-#define CLEANUP_RESOLVER_STATE
-#endif
-
-struct bind_state {
- bool mo...
2014 Dec 12
15
[PATCH v3 00/11] btrfs support part2: qgroup/quota commands
Hi,
This is v3 series to add support to btrfs qgroup related commands, inclduing
quota commands, and two leftover of subvolume commands.
Regards,
Hu
changes:
v3:
- don't intialize fs_buf (patch 1)
- check the return value of sysroot_path (patch 1)
- check fs_buf rather than fs (patch 1)
- fprintf (stderr,...) -> reply_with_error()
v2:
- add tests for new APIs
- combine
2014 Dec 11
14
[PATCH v2 00/11] btrfs support part2: qgroup/quota commands
Hi,
This is v2 series to add support to btrfs qgroup related commands, inclduing
quota commands, and two leftover of subvolume commands.
Regards,
Hu
changes:
v2:
- add tests for new APIs
- combine btrfs_quota_enable and btrfs_quota_disable
- following APIs changed to operate on Mountable_or_Path:
btrfs_subvolume_get_default, btrfs_quota_enable, btrfs_quota_rescan.
Hu Tao (11):
2015 May 27
0
[PATCH RFC] New API: btrfs_convert
...| 18 ++++++++++++++++++
2 files changed, 47 insertions(+)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index 39392f7..7f10792 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -38,6 +38,7 @@ GUESTFSD_EXT_CMD(str_btrfsck, btrfsck);
GUESTFSD_EXT_CMD(str_mkfs_btrfs, mkfs.btrfs);
GUESTFSD_EXT_CMD(str_umount, umount);
GUESTFSD_EXT_CMD(str_btrfsimage, btrfs-image);
+GUESTFSD_EXT_CMD(str_btrfsconvert, btrfs-convert);
int
optgroup_btrfs_available (void)
@@ -2083,3 +2084,31 @@ do_btrfs_image (char *const *sources, const char *image,
return 0;
}
+
+int
+do_btrfs_convert (const char *device, int r...
2015 Jul 23
0
Re: [PATCH] daemon: Run lsof when an umount command fails in umount_all call.
...--
> 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, "lsof", mounts.ar...
2015 Mar 03
0
[PATCH 1/2] New API: btrfs-image
...1 deletion(-)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index d4b3207..be648bc 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -37,6 +37,7 @@ GUESTFSD_EXT_CMD(str_btrfstune, btrfstune);
GUESTFSD_EXT_CMD(str_btrfsck, btrfsck);
GUESTFSD_EXT_CMD(str_mkfs_btrfs, mkfs.btrfs);
GUESTFSD_EXT_CMD(str_umount, umount);
+GUESTFSD_EXT_CMD(str_btrfsimage, btrfs-image);
int
optgroup_btrfs_available (void)
@@ -2005,3 +2006,51 @@ do_btrfstune_enable_skinny_metadata_extent_refs (const char *device)
return 0;
}
+
+int
+do_btrfs_image (char *const *sources, const char *image,
+ int compresslevel, int n...
2015 Mar 24
1
[PATCH v3] New API: btrfs-image
...1 deletion(-)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index fabb00b..39392f7 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -37,6 +37,7 @@ GUESTFSD_EXT_CMD(str_btrfstune, btrfstune);
GUESTFSD_EXT_CMD(str_btrfsck, btrfsck);
GUESTFSD_EXT_CMD(str_mkfs_btrfs, mkfs.btrfs);
GUESTFSD_EXT_CMD(str_umount, umount);
+GUESTFSD_EXT_CMD(str_btrfsimage, btrfs-image);
int
optgroup_btrfs_available (void)
@@ -2040,3 +2041,45 @@ do_btrfstune_enable_skinny_metadata_extent_refs (const char *device)
return 0;
}
+
+int
+do_btrfs_image (char *const *sources, const char *image,
+ int compresslevel)
+{
+...
2014 Jan 19
1
[PATCH] daemon: add missing GUESTFSD_EXT_CMD usage
...", err);
return -1;
diff --git a/daemon/command.c b/daemon/command.c
index 02e1dd4..066c773 100644
--- a/daemon/command.c
+++ b/daemon/command.c
@@ -30,6 +30,7 @@
#include "ignore-value.h"
+GUESTFSD_EXT_CMD(str_cp, cp);
GUESTFSD_EXT_CMD(str_mount, mount);
GUESTFSD_EXT_CMD(str_umount, umount);
@@ -179,7 +180,7 @@ set_up_etc_resolv_conf (struct resolver_state *rs)
/* Now that the guest's <sysroot>/etc/resolv.conf is out the way, we
* can create our own copy of the appliance /etc/resolv.conf.
*/
- ignore_value (command (NULL, NULL, "cp", "/e...
2015 Jun 04
0
Re: [PATCH RFC][Resend] New API: btrfs_convert
..., 47 insertions(+)
>
> diff --git a/daemon/btrfs.c b/daemon/btrfs.c
> index 39392f7..fd679cf 100644
> --- a/daemon/btrfs.c
> +++ b/daemon/btrfs.c
> @@ -38,6 +38,7 @@ GUESTFSD_EXT_CMD(str_btrfsck, btrfsck);
> GUESTFSD_EXT_CMD(str_mkfs_btrfs, mkfs.btrfs);
> GUESTFSD_EXT_CMD(str_umount, umount);
> GUESTFSD_EXT_CMD(str_btrfsimage, btrfs-image);
> +GUESTFSD_EXT_CMD(str_btrfsconvert, btrfs-convert);
>
> int
> optgroup_btrfs_available (void)
> @@ -2083,3 +2084,31 @@ do_btrfs_image (char *const *sources, const char *image,
>
> return 0;
> }
> +...
2015 Mar 17
2
[PATCH v2] New API: btrfs-image
...1 deletion(-)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index d4b3207..340b548 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -37,6 +37,7 @@ GUESTFSD_EXT_CMD(str_btrfstune, btrfstune);
GUESTFSD_EXT_CMD(str_btrfsck, btrfsck);
GUESTFSD_EXT_CMD(str_mkfs_btrfs, mkfs.btrfs);
GUESTFSD_EXT_CMD(str_umount, umount);
+GUESTFSD_EXT_CMD(str_btrfsimage, btrfs-image);
int
optgroup_btrfs_available (void)
@@ -2005,3 +2006,54 @@ do_btrfstune_enable_skinny_metadata_extent_refs (const char *device)
return 0;
}
+
+int
+do_btrfs_image (char *const *sources, const char *image,
+ int compresslevel, int n...
2016 Feb 23
3
[PATCH 1/2] lib: Allow the COMPILE_REGEXP macro to be used everywhere.
Since the daemon links to pcre and use regular expressions, and since
the COMPILE_REGEXP macro doesn't depend on any aspects of the
library-side code (eg. the guestfs_h handle etc), we can allow the
daemon to use the COMPILE_REGEXP macro. Move the macro to
"guestfs-internal-all.h" to permit this.
---
src/guestfs-internal-all.h | 26 ++++++++++++++++++++++++++
src/guestfs-internal.h
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...+++ b/daemon/btrfs.c
@@ -33,13 +33,6 @@
#include "c-ctype.h"
#include "ignore-value.h"
-GUESTFSD_EXT_CMD(str_btrfs, btrfs);
-GUESTFSD_EXT_CMD(str_btrfstune, btrfstune);
-GUESTFSD_EXT_CMD(str_btrfsck, btrfsck);
-GUESTFSD_EXT_CMD(str_mkfs_btrfs, mkfs.btrfs);
-GUESTFSD_EXT_CMD(str_umount, umount);
-GUESTFSD_EXT_CMD(str_btrfsimage, btrfs-image);
-
COMPILE_REGEXP (re_btrfs_subvolume_list,
"ID\\s+(\\d+).*\\s"
"top level\\s+(\\d+).*\\s"
@@ -51,7 +44,7 @@ int
optgroup_btrfs_available (void)
{
return test_mode ||
- (prog_exis...
2015 Mar 03
4
[PATCH 0/2] btrfs: add support to btrfs-image
This series adds new APIs to support btrfstune.
Chen Hanxiao (2):
New API: btrfs-image
New API: btrfs_image_restore
daemon/btrfs.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++
generator/actions.ml | 45 +++++++++++++++++++++++++++
src/MAX_PROC_NR | 2 +-
3 files changed, 133 insertions(+), 1 deletion(-)
--
2.1.0