Displaying 18 results from an estimated 18 matches for "do_xfs_info".
2017 Mar 10
2
[PATCH 1/2] daemon: generate cleanup handlers for structs
This way it is possible to cleanup properly structs in the daemon, when
using them within other daemon functions.
---
.gitignore | 2 +
daemon/Makefile.am | 4 ++
daemon/daemon.h | 1 +
generator/daemon.ml | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++
generator/daemon.mli | 2 +
generator/main.ml | 4 ++
6 files changed, 114 insertions(+)
diff --git
2012 Jul 24
3
[PATCH V4 1/3] umount: add force umount and lazy umount
Add the option force and lazy for force and lazy umount.
Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com>
---
daemon/mount.c | 25 +++++++++++++++++++++++--
generator/generator_actions.ml | 23 ++++++++++++-----------
gobject/Makefile.inc | 2 ++
po/POTFILES | 1 +
4 files changed, 38 insertions(+), 13 deletions(-)
diff --git
2012 Jul 21
5
[PATCH 1/5] mount: add a macro to resolve path or device
Add a macro DUP_RESOLVE_DEVICE_OR_PATH to resolve path or device.
Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com>
---
daemon/daemon.h | 18 ++++++++++++++++++
daemon/mount.c | 13 ++-----------
po/POTFILES | 8 ++++++++
3 files changed, 28 insertions(+), 11 deletions(-)
diff --git a/daemon/daemon.h b/daemon/daemon.h
index 85eec45..39cc3f3 100644
--- a/daemon/daemon.h
+++
2017 Mar 10
0
[PATCH 2/2] daemon: fix memory leak in xfs implementation of vfs_minimum_size
...le changed, 1 insertion(+), 1 deletion(-)
diff --git a/daemon/xfs.c b/daemon/xfs.c
index 7f72e6a..a0d08b2 100644
--- a/daemon/xfs.c
+++ b/daemon/xfs.c
@@ -664,7 +664,7 @@ do_xfs_repair (const char *device,
int64_t
xfs_minimum_size (const char *path)
{
- CLEANUP_FREE guestfs_int_xfsinfo *info = do_xfs_info (path);
+ CLEANUP_FREE_XFSINFO struct guestfs_int_xfsinfo *info = do_xfs_info (path);
if (info == NULL)
return -1;
--
2.9.3
2015 Oct 24
3
[PATCH] Added xfs support for vfs_min_size.
...vfs_type);
diff --git a/daemon/xfs.c b/daemon/xfs.c
index f748902..c4533bf 100644
--- a/daemon/xfs.c
+++ b/daemon/xfs.c
@@ -660,3 +660,15 @@ do_xfs_repair (const char *device,
return r;
}
+
+int64_t
+xfs_minimum_size (const char *path)
+{
+ CLEANUP_FREE guestfs_int_xfsinfo *info = do_xfs_info (path);
+
+ if (info == NULL)
+ return -1;
+
+ // XFS does not support shrinking.
+ return info->xfs_blocksize * info->xfs_datablocks;
+}
diff --git a/generator/actions.ml b/generator/actions.ml
index 8832410..d8af08d 100644
--- a/generator/actions.ml
+++ b/generator/actions.ml
@@ -1276...
2012 Jul 23
3
[PATCH V2 1/4] mount: add a macro to resolve path or device
Add a macro STRDUP_RESOLVE_DEVICE_OR_PATH to resolve path or device.
Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com>
---
daemon/daemon.h | 16 ++++++++++++++++
daemon/mount.c | 13 ++-----------
2 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/daemon/daemon.h b/daemon/daemon.h
index 85eec45..f7d0c75 100644
--- a/daemon/daemon.h
+++ b/daemon/daemon.h
@@ -336,6
2015 Oct 27
1
[PATCHv2] Added xfs support to vfs_minimum_size.
...vfs_type);
diff --git a/daemon/xfs.c b/daemon/xfs.c
index f748902..abc2736 100644
--- a/daemon/xfs.c
+++ b/daemon/xfs.c
@@ -660,3 +660,19 @@ do_xfs_repair (const char *device,
return r;
}
+
+int64_t
+xfs_minimum_size (const char *path)
+{
+ CLEANUP_FREE guestfs_int_xfsinfo *info = do_xfs_info (path);
+
+ if (info == NULL)
+ return -1;
+
+ // XFS does not support shrinking.
+ if (INT64_MAX / info->xfs_blocksize < info->xfs_datablocks) {
+ reply_with_error ("filesystem size too big: overflow");
+ return -1;
+ }
+ return info->xfs_blocksize * info->xf...
2012 Jul 23
1
[PATCH V3 1/2] umount: add force umount and lazy umount
Add the option force and lazy for force and lazy umount.
Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com>
---
daemon/mount.c | 25 +++++++++++++++++++++++--
generator/generator_actions.ml | 23 ++++++++++++-----------
gobject/Makefile.inc | 2 ++
po/POTFILES | 1 +
4 files changed, 38 insertions(+), 13 deletions(-)
diff --git
2012 Jul 09
1
[PATCH] NEW API: add new api xfs_info
....h>
+#include <string.h>
+#include <unistd.h>
+
+#include "guestfs_protocol.h"
+#include "daemon.h"
+#include "c-ctype.h"
+#include "actions.h"
+
+int
+optgroup_xfs_available (void)
+{
+ return prog_exists ("mkfs.xfs");
+}
+
+char *
+do_xfs_info (const char *path)
+{
+ int r;
+ char *buf;
+ char *out, *err;
+
+ if (do_is_dir (path)) {
+ buf = sysroot_path (path);
+ if (!buf) {
+ reply_with_perror ("malloc");
+ return NULL;
+ }
+ } else {
+ buf = strdup(path);
+ if (!buf) {
+ reply_with_perror (&...
2012 Jul 16
2
[PATCH V4] NEW API: add new api xfs_info
...>rtname == NULL) {
+ ret->rtname = strdup ("");
+ if (ret->rtname == NULL) goto error;
+ }
+
+ return ret;
+
+error:
+ free (buf);
+ free (ret->mntpoint);
+ free (ret->logname);
+ free (ret->rtname);
+ free (ret);
+ return NULL;
+}
+
+guestfs_int_xfsinfo *
+do_xfs_info (const char *path)
+{
+ int r;
+ char *buf;
+ char *out = NULL, *err = NULL;
+ char **lines = NULL;
+ guestfs_int_xfsinfo *ret = NULL;
+
+ if (do_is_dir (path)) {
+ buf = sysroot_path (path);
+ if (!buf) {
+ reply_with_perror ("malloc");
+ return NULL;
+ }
+ } el...
2017 Aug 03
0
[PATCH 3/6] daemon: Refine check for Device and Dev_or_Path parameters (RHBZ#1477623).
...l split_device_partition : string -> string * int
(** Split a device name like [/dev/sda1] into a device name and
partition number, eg. ["sda", 1].
diff --git a/daemon/xfs.c b/daemon/xfs.c
index 84e361569..3707f56d9 100644
--- a/daemon/xfs.c
+++ b/daemon/xfs.c
@@ -327,7 +327,7 @@ do_xfs_info (const char *pathordevice)
CLEANUP_FREE_STRING_LIST char **lines = NULL;
int is_dev;
- is_dev = STREQLEN (pathordevice, "/dev/", 5);
+ is_dev = is_device_parameter (pathordevice);
buf = is_dev ? strdup (pathordevice)
: sysroot_path (pathordevice);
if (buf =...
2012 Aug 30
2
[PATCH v2] daemon: collect list of called external commands
...UESTFSD_EXT_CMD(str_xfs_info, xfs_info);
+GUESTFSD_EXT_CMD(str_xfs_growfs, xfs_growfs);
+GUESTFSD_EXT_CMD(str_xfs_repair, xfs_repair);
+
int
optgroup_xfs_available (void)
{
- return prog_exists ("mkfs.xfs");
+ return prog_exists (str_mkfs_xfs);
}
static char *
@@ -330,7 +336,7 @@ do_xfs_info (const char *pathordevice)
return NULL;
}
- r = command (&out, &err, "xfs_info", buf, NULL);
+ r = command (&out, &err, str_xfs_info, buf, NULL);
free (buf);
if (r == -1) {
reply_with_error ("%s", err);
@@ -374,7 +380,7 @@ do_xfs_growfs (co...
2012 Aug 30
1
[PATCH] collect list of called external commands
...);
+GUESTFS_EXT_CMD(str_xfs_admin, xfs_admin);
+GUESTFS_EXT_CMD(str_xfs_info, xfs_info);
+GUESTFS_EXT_CMD(str_xfs_growfs, xfs_growfs);
+
int
optgroup_xfs_available (void)
{
- return prog_exists ("mkfs.xfs");
+ return prog_exists (str_mkfs_xfs);
}
static char *
@@ -330,7 +335,7 @@ do_xfs_info (const char *pathordevice)
return NULL;
}
- r = command (&out, &err, "xfs_info", buf, NULL);
+ r = command (&out, &err, str_xfs_info, buf, NULL);
free (buf);
if (r == -1) {
reply_with_error ("%s", err);
@@ -374,7 +379,7 @@ do_xfs_growfs (co...
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...str_xfs_growfs, xfs_growfs);
-GUESTFSD_EXT_CMD(str_xfs_repair, xfs_repair);
-
int
optgroup_xfs_available (void)
{
- return prog_exists (str_mkfs_xfs);
+ return prog_exists ("mkfs.xfs");
}
/* Return everything up to the first comma, equals or space in the input
@@ -341,7 +335,7 @@ do_xfs_info (const char *pathordevice)
return NULL;
}
- r = command (&out, &err, str_xfs_info, buf, NULL);
+ r = command (&out, &err, "xfs_info", buf, NULL);
if (r == -1) {
reply_with_error ("%s", err);
return NULL;
@@ -376,7 +370,7 @@ do_xfs_growfs...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...uot;, "xfs_info", "xfs_growfs", "xfs_repair")
int
optgroup_xfs_available (void)
{
- return prog_exists (str_mkfs_xfs);
+ return prog_exists ("mkfs.xfs");
}
/* Return everything up to the first comma, equals or space in the input
@@ -341,7 +338,7 @@ do_xfs_info (const char *pathordevice)
return NULL;
}
- r = command (&out, &err, str_xfs_info, buf, NULL);
+ r = command (&out, &err, "xfs_info", buf, NULL);
if (r == -1) {
reply_with_error ("%s", err);
return NULL;
@@ -376,7 +373,7 @@ do_xfs_growfs...
2017 Aug 03
9
[PATCH 0/6] tests: Fix handling of device API parameters (RHBZ#1477623).
https://bugzilla.redhat.com/show_bug.cgi?id=1477623
The first two patches are cleanups.
The third patch changes the way that we handle Device and Dev_or_Path
parameters so that a parameter marked as such can really only contain
a block device name (and not, for instance, a chardev). Using a
chardev here caused hangs in the API.
The next two patches fix API usage to conform to this new stricter
2017 Jul 27
3
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
This is a simpler patch that removes GUESTFSD_EXT_CMD completely.
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’