search for: do_xfs_repair

Displaying 13 results from an estimated 13 matches for "do_xfs_repair".

2015 Jul 17
1
[PATCH] daemon: add a space after func/macro to fit code-style
...maxpct must be >= 0"); return -1; } - snprintf(maxpct_s, sizeof maxpct_s, "%" PRIi32, maxpct); + snprintf (maxpct_s, sizeof maxpct_s, "%" PRIi32, maxpct); ADD_ARG (argv, i, "-m"); ADD_ARG (argv, i, maxpct_s); } @@ -591,7 +591,7 @@ do_xfs_repair (const char *device, reply_with_error ("maxmem must be >= 0"); return -1; } - snprintf(maxmem_s, sizeof maxmem_s, "%" PRIi64, maxmem); + snprintf (maxmem_s, sizeof maxmem_s, "%" PRIi64, maxmem); ADD_ARG (argv, i, "-m"); A...
2015 Oct 27
1
[PATCHv2] Added xfs support to vfs_minimum_size.
...inimum_size (path); + } + else NOT_SUPPORTED (-1, "don't know how to get minimum size of '%s' filesystems", 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_datablo...
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 Aug 21
1
[PATCH] xfs: add a new api xfs_repair
...| 1 + src/MAX_PROC_NR | 2 +- 5 files changed, 145 insertions(+), 3 deletions(-) diff --git a/daemon/xfs.c b/daemon/xfs.c index 12ed600..8a86f93 100644 --- a/daemon/xfs.c +++ b/daemon/xfs.c @@ -536,3 +536,119 @@ error: free (err); return -1; } + +int +do_xfs_repair (const char *device, + int imgfile, int forcelogzero, int dangerous, + int nomodify, int noprefetch, int forcegeometry, + int64_t maxmem, int64_t ihashsize, + int64_t bhashsize, int64_t agstride, + const char *logdev, const char *rtde...
2017 Mar 10
0
[PATCH 2/2] daemon: fix memory leak in xfs implementation of vfs_minimum_size
...t (so the string fields are deleted too). Fixes commit f5caa421d1bb826559ec7a6d98c1a6b6b1f0a629. --- daemon/xfs.c | 2 +- 1 file 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.
...inimum_size (path); + } + else NOT_SUPPORTED (-1, "don't know how to get minimum size of '%s' filesystems", 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...
2017 Aug 03
0
[PATCH 3/6] daemon: Refine check for Device and Dev_or_Path parameters (RHBZ#1477623).
...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 == NULL) { @@ -631,7 +631,7 @@ do_xfs_repair (const char *device, ADD_ARG (argv, i, rtdev); } - is_device = STREQLEN (device, "/dev/", 5); + is_device = is_device_parameter (device); if (!is_device) { buf = sysroot_path (device); if (buf == NULL) { -- 2.13.1
2012 Aug 30
2
[PATCH v2] daemon: collect list of called external commands
...7 +477,7 @@ do_xfs_admin (const char *device, const char *argv[MAX_ARGS]; size_t i = 0; - ADD_ARG (argv, i, "xfs_admin"); + ADD_ARG (argv, i, str_xfs_admin); /* Optional arguments */ if (!(optargs_bitmask & GUESTFS_XFS_ADMIN_EXTUNWRITTEN_BITMASK)) @@ -548,7 +554,7 @@ do_xfs_repair (const char *device, size_t i = 0; int is_device; - ADD_ARG (argv, i, "xfs_repair"); + ADD_ARG (argv, i, str_xfs_repair); /* Optional arguments */ if (optargs_bitmask & GUESTFS_XFS_REPAIR_FORCELOGZERO_BITMASK) { diff --git a/daemon/zero.c b/daemon/zero.c index 14aef7...
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...7 +481,7 @@ do_xfs_admin (const char *device, const char *argv[MAX_ARGS]; size_t i = 0; - ADD_ARG (argv, i, str_xfs_admin); + ADD_ARG (argv, i, "xfs_admin"); /* Optional arguments */ if (!(optargs_bitmask & GUESTFS_XFS_ADMIN_EXTUNWRITTEN_BITMASK)) @@ -564,7 +558,7 @@ do_xfs_repair (const char *device, size_t i = 0; int is_device; - ADD_ARG (argv, i, str_xfs_repair); + ADD_ARG (argv, i, "xfs_repair"); /* Optional arguments */ if (optargs_bitmask & GUESTFS_XFS_REPAIR_FORCELOGZERO_BITMASK) { diff --git a/daemon/zero.c b/daemon/zero.c index 516680...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...7 +484,7 @@ do_xfs_admin (const char *device, const char *argv[MAX_ARGS]; size_t i = 0; - ADD_ARG (argv, i, str_xfs_admin); + ADD_ARG (argv, i, "xfs_admin"); /* Optional arguments */ if (!(optargs_bitmask & GUESTFS_XFS_ADMIN_EXTUNWRITTEN_BITMASK)) @@ -564,7 +561,7 @@ do_xfs_repair (const char *device, size_t i = 0; int is_device; - ADD_ARG (argv, i, str_xfs_repair); + ADD_ARG (argv, i, "xfs_repair"); /* Optional arguments */ if (optargs_bitmask & GUESTFS_XFS_REPAIR_FORCELOGZERO_BITMASK) { diff --git a/daemon/zero.c b/daemon/zero.c index 516680...
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’