search for: do_md_stop

Displaying 20 results from an estimated 20 matches for "do_md_stop".

2011 Nov 24
1
[PATCH] New API: md-stop for stopping MD devices
...ns/test-mdadm.sh | 14 ++++++++++++++ src/MAX_PROC_NR | 2 +- 4 files changed, 40 insertions(+), 1 deletions(-) diff --git a/daemon/md.c b/daemon/md.c index 82ddb82..e613db7 100644 --- a/daemon/md.c +++ b/daemon/md.c @@ -310,3 +310,19 @@ error: return NULL; } + +int +do_md_stop(const char *md) +{ + int r; + char *err = NULL; + + const char *mdadm[] = { "mdadm", "--stop", md, NULL}; + r = commandv(NULL, &err, mdadm); + if (r == -1) { + reply_with_error("%s", err); + free(err); + return -1; + } + return 0; +} diff --git a/ge...
2012 Feb 06
3
[PATCH 1/3] NEW API: add a new api zero_fs
Add the new api zero_fs to erase the filesystem signatures on a device but now erase any data. Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- daemon/zero.c | 17 +++++++++++++++++ generator/generator_actions.ml | 14 ++++++++++++++ src/MAX_PROC_NR | 2 +- 3 files changed, 32 insertions(+), 1 deletions(-) diff --git a/daemon/zero.c
2015 Jul 17
1
[PATCH] daemon: add a space after func/macro to fit code-style
...len); + n = mempcpy (n, &mds.gl_pathv[i][strlen (PREFIX)], len); *n = '\0'; if (!is_raid_device (dev)) { @@ -273,7 +273,7 @@ error: } char ** -do_md_detail(const char *md) +do_md_detail (const char *md) { size_t i; int r; @@ -345,15 +345,15 @@ error: } int -do_md_stop(const char *md) +do_md_stop (const char *md) { int r; CLEANUP_FREE char *err = NULL; const char *mdadm[] = { str_mdadm, "--stop", md, NULL}; - r = commandv(NULL, &err, mdadm); + r = commandv (NULL, &err, mdadm); if (r == -1) { - reply_with_error("%s",...
2017 Jul 14
0
[PATCH 23/27] daemon: Reimplement ‘md_detail’ API in OCaml.
...ldn't happen). Log to stderr so - * it will show up in LIBGUESTFS_DEBUG. */ - fprintf (stderr, "md-detail: unexpected mdadm output ignored: %s", line); - } - } - - if (end_stringsbuf (&ret) == -1) - return NULL; - - return take_stringsbuf (&ret); -} - int do_md_stop (const char *md) { diff --git a/daemon/md.ml b/daemon/md.ml index caf87cf8f..ba045b5f7 100644 --- a/daemon/md.ml +++ b/daemon/md.ml @@ -46,3 +46,40 @@ let list_md_devices () = (* Return the list sorted. *) sort_device_names devs + +let md_detail md = + let out = command "mdadm"...
2012 Jan 24
14
[PATCH 00/14] Run the daemon under valgrind and fix resultant errors.
This patch series lets you run the daemon under valgrind. Many errors were found and fixed. With the complete series applied, valgrind doesn't show any errors.
2011 Nov 24
1
[PATCH] Rename mdadm_ apis to md_
This change renames the following 2 apis: * mdadm_create -> md_create * mdadm_detail -> md_detail This is more consistent with list_md_devices, and removes a reference to an implementation detail from the api. --- daemon/md.c | 24 ++++++++++++------------ generator/generator_actions.ml | 4 ++-- regressions/test-list-filesystems.sh | 2 +-
2020 Sep 01
10
remove revalidate_disk()
Hi Jens, this series removes the revalidate_disk() function, which has been a really odd duck in the last years. The prime reason why most people use it is because it propagates a size change from the gendisk to the block_device structure. But it also calls into the rather ill defined ->revalidate_disk method which is rather useless for the callers. So this adds a new helper to just
2012 Feb 01
1
[PATCH] Clarify the error message when unavailable functions are called (RHBZ#679737).
...md_detail(const char *md) char **ret = NULL; int size = 0, alloc = 0; + IF_NOT_AVAILABLE_ERROR (mdadm, NULL); + const char *mdadm[] = { "mdadm", "-D", "--export", md, NULL }; r = commandv (&out, &err, mdadm); if (r == -1) { @@ -320,6 +326,8 @@ do_md_stop(const char *md) int r; char *err = NULL; + IF_NOT_AVAILABLE_ERROR (mdadm, -1); + const char *mdadm[] = { "mdadm", "--stop", md, NULL}; r = commandv(NULL, &err, mdadm); if (r == -1) { diff --git a/daemon/mknod.c b/daemon/mknod.c index d5b8467..d13414b 100644...
2012 Aug 30
2
[PATCH v2] daemon: collect list of called external commands
...r *mdadm[] = { "mdadm", "-D", "--export", md, NULL }; + const char *mdadm[] = { str_mdadm, "-D", "--export", md, NULL }; r = commandv (&out, &err, mdadm); if (r == -1) { reply_with_error ("%s", err); @@ -319,7 +321,7 @@ do_md_stop(const char *md) int r; char *err = NULL; - const char *mdadm[] = { "mdadm", "--stop", md, NULL}; + const char *mdadm[] = { str_mdadm, "--stop", md, NULL}; r = commandv(NULL, &err, mdadm); if (r == -1) { reply_with_error("%s", err); di...
2012 Aug 30
1
[PATCH] collect list of called external commands
...r *mdadm[] = { "mdadm", "-D", "--export", md, NULL }; + const char *mdadm[] = { str_mdadm, "-D", "--export", md, NULL }; r = commandv (&out, &err, mdadm); if (r == -1) { reply_with_error ("%s", err); @@ -319,7 +321,7 @@ do_md_stop(const char *md) int r; char *err = NULL; - const char *mdadm[] = { "mdadm", "--stop", md, NULL}; + const char *mdadm[] = { str_mdadm, "--stop", md, NULL}; r = commandv(NULL, &err, mdadm); if (r == -1) { reply_with_error("%s", err); di...
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...r *mdadm[] = { str_mdadm, "-D", "--export", md, NULL }; + const char *mdadm[] = { "mdadm", "-D", "--export", md, NULL }; r = commandv (&out, &err, mdadm); if (r == -1) { reply_with_error ("%s", err); @@ -353,7 +351,7 @@ do_md_stop (const char *md) int r; CLEANUP_FREE char *err = NULL; - const char *mdadm[] = { str_mdadm, "--stop", md, NULL}; + const char *mdadm[] = { "mdadm", "--stop", md, NULL}; r = commandv (NULL, &err, mdadm); if (r == -1) { reply_with_error ("%s...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...r *mdadm[] = { str_mdadm, "-D", "--export", md, NULL }; + const char *mdadm[] = { "mdadm", "-D", "--export", md, NULL }; r = commandv (&out, &err, mdadm); if (r == -1) { reply_with_error ("%s", err); @@ -353,7 +353,7 @@ do_md_stop (const char *md) int r; CLEANUP_FREE char *err = NULL; - const char *mdadm[] = { str_mdadm, "--stop", md, NULL}; + const char *mdadm[] = { "mdadm", "--stop", md, NULL}; r = commandv (NULL, &err, mdadm); if (r == -1) { reply_with_error ("%s...
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’
2017 Jul 27
23
[PATCH v3 00/23] Reimplement many daemon APIs in OCaml.
I think this fixes everything mentioned: - Added the Optgroups module as suggested. - Remove command temporary files. - Replace command ~flags with ?fold_stdout_on_stderr. - Nest _with_mounted function. - Rebase & retest. Rich.
2017 Jul 21
27
[PATCH v2 00/23] Reimplement many daemon APIs in OCaml.
v1 was posted here: https://www.redhat.com/archives/libguestfs/2017-July/msg00098.html This series now depends on two small patches which I posted separately: https://www.redhat.com/archives/libguestfs/2017-July/msg00207.html https://www.redhat.com/archives/libguestfs/2017-July/msg00209.html v1 -> v2: - Previously changes to generator/daemon.ml were made incrementally through the patch
2017 Jul 14
45
[PATCH 00/27] Reimplement many daemon APIs in OCaml.
Previously posted as part of the mega utilities/inspection series here: https://www.redhat.com/archives/libguestfs/2017-June/msg00232.html What I've done is to extract just the parts related to rewriting daemon APIs in OCaml, rebase them on top of the current master, fix a few things, and recompile and test everything. Rich.
2017 Jun 19
29
[PATCH v7 00/29] Reimplement inspection in the daemon.
v6 was posted here: https://www.redhat.com/archives/libguestfs/2017-June/msg00103.html and this requires the utilities refactoring posted here: https://www.redhat.com/archives/libguestfs/2017-June/msg00169.html Inspection is now complete[*], although not very well tested. I'm intending to compare the output of many guests using old & new virt-inspector to see if I can find any
2017 Jun 15
45
[PATCH v6 00/41] Refactor utilities, reimplement inspection in the daemon.
v5: https://www.redhat.com/archives/libguestfs/2017-June/msg00065.html Since v5, this now implements inspection almost completely for Linux and Windows guests. Rich.
2017 Jun 21
45
[PATCH v8 00/42] Refactor utilities and reimplement inspection.
v7 was: https://www.redhat.com/archives/libguestfs/2017-June/msg00169.html https://www.redhat.com/archives/libguestfs/2017-June/msg00184.html I believe this addresses all comments received so far. Also it now passes a test where I compared about 100 disk images processed with old and new virt-inspector binaries. The output is identical in all cases except one which is caused by a bug in blkid