Displaying 20 results from an estimated 25 matches for "do_btrfs_filesystem_sync".
2014 Dec 05
2
Re: [PATCH 1/8] New API: btrfs_subvolume_get_default
...if (sscanf (out, "ID %" SCNi64, &ret) != 2) {
// error ...
}
> + if (r != LONGINT_OK) {
> + reply_with_error ("%s: could not parse subvolume id: %s.", argv[0], out);
> + return -1;
> + }
> +
> + return ret;
> +}
> +
> int
> do_btrfs_filesystem_sync (const char *fs)
> {
> diff --git a/generator/actions.ml b/generator/actions.ml
> index 385b620..80c7ea7 100644
> --- a/generator/actions.ml
> +++ b/generator/actions.ml
> @@ -12027,6 +12027,15 @@ Set readahead (in 512-byte sectors) for the device.
>
> This uses the L<...
2014 Nov 21
0
[PATCH 5/6] New API: btrfs_subvolume_get_default
...out);
+ if (r == -1) {
+ reply_with_error ("%s: %s", fs, err);
+ return -1;
+ }
+ r = -1;
+ if (sscanf (out, "ID %" SCNi32, &r) != 1) {
+ reply_with_error ("%s: expected output, but got nothing", argv[0]);
+ return -1;
+ }
+
+ return r;
+}
+
+int
do_btrfs_filesystem_sync (const char *fs)
{
const size_t MAX_ARGS = 64;
diff --git a/generator/actions.ml b/generator/actions.ml
index 1c1fcff..cf96039 100644
--- a/generator/actions.ml
+++ b/generator/actions.ml
@@ -12005,6 +12005,15 @@ This is the same as the C<lstat(2)> system call." };
longdesc = &q...
2014 Dec 02
0
[PATCH 1/8] New API: btrfs_subvolume_get_default
...{
+ reply_with_error ("%s: %s", mountpoint, err);
+ return -1;
+ }
+ r = xstrtol (out + 2, NULL, 10, &ret, NULL);
+ if (r != LONGINT_OK) {
+ reply_with_error ("%s: could not parse subvolume id: %s.", argv[0], out);
+ return -1;
+ }
+
+ return ret;
+}
+
int
do_btrfs_filesystem_sync (const char *fs)
{
diff --git a/generator/actions.ml b/generator/actions.ml
index 385b620..80c7ea7 100644
--- a/generator/actions.ml
+++ b/generator/actions.ml
@@ -12027,6 +12027,15 @@ Set readahead (in 512-byte sectors) for the device.
This uses the L<blockdev(8)> command." };
+...
2014 Dec 11
0
[PATCH v2 02/11] New API: btrfs_subvolume_get_default
...r;
+ }
+ if (sscanf (out, "ID %" SCNi64, &ret) != 1) {
+ reply_with_error ("%s: could not parse subvolume id: %s.", argv[0], out);
+ ret = -1;
+ goto error;
+ }
+
+error:
+ if (fs_buf && umount (fs_buf, fs) != 0)
+ return -1;
+ return ret;
+}
+
int
do_btrfs_filesystem_sync (const char *fs)
{
diff --git a/generator/actions.ml b/generator/actions.ml
index ba97eb3..4e47a02 100644
--- a/generator/actions.ml
+++ b/generator/actions.ml
@@ -12032,6 +12032,24 @@ Set readahead (in 512-byte sectors) for the device.
This uses the L<blockdev(8)> command." };
+...
2017 Jul 21
0
[PATCH v2 15/23] daemon: Reimplement ‘btrfs_subvolume_list’ and ‘btrfs_subvolume_get_default’ in OCaml.
...r;
- }
- if (sscanf (out, "ID %" SCNi64, &ret) != 1) {
- reply_with_error ("%s: could not parse subvolume id: %s", argv[0], out);
- ret = -1;
- goto error;
- }
-
- error:
- if (fs_buf && umount (fs_buf, fs) != 0)
- return -1;
- return ret;
-}
-
int
do_btrfs_filesystem_sync (const char *fs)
{
diff --git a/daemon/btrfs.ml b/daemon/btrfs.ml
new file mode 100644
index 000000000..01484adab
--- /dev/null
+++ b/daemon/btrfs.ml
@@ -0,0 +1,126 @@
+(* guestfs-inspection
+ * Copyright (C) 2009-2017 Red Hat Inc.
+ *
+ * This program is free software; you can redistribute it and...
[PATCH 18/27] daemon: Reimplement ‘btrfs_subvolume_list’ and ‘btrfs_subvolume_get_default’ in OCaml.
2017 Jul 14
0
[PATCH 18/27] daemon: Reimplement ‘btrfs_subvolume_list’ and ‘btrfs_subvolume_get_default’ in OCaml.
...r;
- }
- if (sscanf (out, "ID %" SCNi64, &ret) != 1) {
- reply_with_error ("%s: could not parse subvolume id: %s", argv[0], out);
- ret = -1;
- goto error;
- }
-
- error:
- if (fs_buf && umount (fs_buf, fs) != 0)
- return -1;
- return ret;
-}
-
int
do_btrfs_filesystem_sync (const char *fs)
{
diff --git a/daemon/btrfs.ml b/daemon/btrfs.ml
new file mode 100644
index 000000000..554212ccf
--- /dev/null
+++ b/daemon/btrfs.ml
@@ -0,0 +1,127 @@
+(* guestfs-inspection
+ * Copyright (C) 2009-2017 Red Hat Inc.
+ *
+ * This program is free software; you can redistribute it and...
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):
2014 Nov 26
7
[PATCH v2 0/5] btrfs support part1: subvolume commands
Hi,
This is the part1 of improving btrfs support. This series adds missing
parameters to btrfs_subvolume_snapshot and btrfs_subvolume_create, and
adds two new API btrfs_subvolume_get_default and btrfs_subvolume_show.
Other parts will follow.
Regards,
Hu
changes:
v2:
- add 'once_had_no_optargs = true' for btrfs_subvolume_snapshot and
btrfs_subvolume_create
- improved documents
2014 Dec 02
21
[PATCH 0/8] btrfs support part2: qgroup commands
Hi,
This series adds support to btrfs qgroup related commands, inclduing
quota commands, and two leftover of subvolume commands.
Regards,
Hu
Hu Tao (8):
New API: btrfs_subvolume_get_default
New API: btrfs_subvolume_show
New API: btrfs_quota_enable
New API: btrfs_quota_disable
New API: btrfs_quota_rescan
New API: btrfs_qgroup_limit
New API: btrfs_qgroup_create
New API:
2014 Nov 21
13
[PATCH 0/6] btrfs support part1: subvolume commands
Hi,
This is the part1 of improving btrfs support. This series adds missing
parameters to btrfs_subvolume_snapshot and btrfs_subvolume_create, and
adds two new API btrfs_subvolume_get_default and btrfs_subvolume_show.
Other parts will follow.
Regards,
Hu
Hu Tao (6):
btrfs: correct words about subvolume and snapshot
btrfs: add optional parameter `ro' to btrfs_subvolume_snapshot
btrfs:
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
2012 Aug 30
2
[PATCH v2] daemon: collect list of called external commands
...@@ do_btrfs_subvolume_set_default (int64_t id, const char *fs)
return -1;
}
- ADD_ARG (argv, i, "btrfs");
+ ADD_ARG (argv, i, str_btrfs);
ADD_ARG (argv, i, "subvolume");
ADD_ARG (argv, i, "set-default");
ADD_ARG (argv, i, buf);
@@ -463,7 +468,7 @@ do_btrfs_filesystem_sync (const char *fs)
return -1;
}
- ADD_ARG (argv, i, "btrfs");
+ ADD_ARG (argv, i, str_btrfs);
ADD_ARG (argv, i, "filesystem");
ADD_ARG (argv, i, "sync");
ADD_ARG (argv, i, fs_buf);
@@ -497,7 +502,7 @@ do_btrfs_filesystem_balance (const char *fs)...
2012 Aug 30
1
[PATCH] collect list of called external commands
...@@ do_btrfs_subvolume_set_default (int64_t id, const char *fs)
return -1;
}
- ADD_ARG (argv, i, "btrfs");
+ ADD_ARG (argv, i, str_btrfs);
ADD_ARG (argv, i, "subvolume");
ADD_ARG (argv, i, "set-default");
ADD_ARG (argv, i, buf);
@@ -463,7 +468,7 @@ do_btrfs_filesystem_sync (const char *fs)
return -1;
}
- ADD_ARG (argv, i, "btrfs");
+ ADD_ARG (argv, i, str_btrfs);
ADD_ARG (argv, i, "filesystem");
ADD_ARG (argv, i, "sync");
ADD_ARG (argv, i, fs_buf);
@@ -497,7 +502,7 @@ do_btrfs_filesystem_balance (const char *fs)...
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...olume_get_default (const mountable_t *fs)
if (fs_buf == NULL)
goto error;
- ADD_ARG (argv, i, str_btrfs);
+ ADD_ARG (argv, i, "btrfs");
ADD_ARG (argv, i, "subvolume");
ADD_ARG (argv, i, "get-default");
ADD_ARG (argv, i, fs_buf);
@@ -661,7 +654,7 @@ do_btrfs_filesystem_sync (const char *fs)
return -1;
}
- ADD_ARG (argv, i, str_btrfs);
+ ADD_ARG (argv, i, "btrfs");
ADD_ARG (argv, i, "filesystem");
ADD_ARG (argv, i, "sync");
ADD_ARG (argv, i, fs_buf);
@@ -692,7 +685,7 @@ do_btrfs_filesystem_balance (const char *fs)...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...olume_get_default (const mountable_t *fs)
if (fs_buf == NULL)
goto error;
- ADD_ARG (argv, i, str_btrfs);
+ ADD_ARG (argv, i, "btrfs");
ADD_ARG (argv, i, "subvolume");
ADD_ARG (argv, i, "get-default");
ADD_ARG (argv, i, fs_buf);
@@ -661,7 +657,7 @@ do_btrfs_filesystem_sync (const char *fs)
return -1;
}
- ADD_ARG (argv, i, str_btrfs);
+ ADD_ARG (argv, i, "btrfs");
ADD_ARG (argv, i, "filesystem");
ADD_ARG (argv, i, "sync");
ADD_ARG (argv, i, fs_buf);
@@ -692,7 +688,7 @@ do_btrfs_filesystem_balance (const char *fs)...
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 Jun 05
19
[PATCH v3 00/19] Allow APIs to be implemented in OCaml.
v2 was here:
https://www.redhat.com/archives/libguestfs/2017-June/msg00008.html
This series gets as far as a working (and faster) reimplementation of
‘guestfs_list_filesystems’.
I also have another patch series on top of this one which reimplements
the inspection APIs inside the daemon, but that needs a bit more work
still, since inspection turns out to be a very large piece of code.
Rich.
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