search for: do_btrfs_filesystem_defrag

Displaying 15 results from an estimated 15 matches for "do_btrfs_filesystem_defrag".

2015 Jan 05
3
Re: [PATCH 5/5] New API: btrfs_filesystem_set_label
...rator/actions.ml | 16 ++++++++++++++++ > src/MAX_PROC_NR | 2 +- > 3 files changed, 50 insertions(+), 1 deletion(-) > > diff --git a/daemon/btrfs.c b/daemon/btrfs.c > index 32b1b05..f9e35be 100644 > --- a/daemon/btrfs.c > +++ b/daemon/btrfs.c > @@ -1463,3 +1463,36 @@ do_btrfs_filesystem_defragment (const char *path) > > return 0; > } > + > +int > +do_btrfs_filesystem_set_label (const char *path, const char *label) > +{ > + const size_t MAX_ARGS = 64; > + const char *argv[MAX_ARGS]; > + size_t i = 0; > + CLEANUP_FREE char *path_buf = NULL; > +...
2015 Jan 13
1
Re: [PATCH 4/5] New API: add btrfs_filesystem_defragment
...ons(+), 1 deletion(-) > > diff --git a/daemon/btrfs.c b/daemon/btrfs.c > index 6c74892..32b1b05 100644 > --- a/daemon/btrfs.c > +++ b/daemon/btrfs.c > @@ -1431,3 +1431,35 @@ do_btrfs_filesystem_get_label (const char *path) > > return out; > } > + > +int > +do_btrfs_filesystem_defragment (const char *path) > +{ > + const size_t MAX_ARGS = 64; > + const char *argv[MAX_ARGS]; > + size_t i = 0; > + CLEANUP_FREE char *path_buf = NULL; > + CLEANUP_FREE char *err = NULL; > + CLEANUP_FREE char *out = NULL; > + int r; > + > + path_buf = sysroot_pat...
2014 Dec 26
10
[PATCH 0/5] btrfs: add API for btrfs filesystem, check and scrub
Hi, There is one problem: btrfs_filesystem_set_label just doesnt work, giving error message: libguestfs: error: btrfs_filesystem_set_label: /: ERROR: unable to set label Bad address I'm almost sure the patch has no problem, but can't figure out what's the cause. So patch 5 is only for review. Other APIs have no problem. Regards, Hu Hu Tao (5): New API: btrfs_scrub New API:
2015 Jul 13
1
[PATCH] daemon: add a space after func name to fit code-style
...return NULL; } else { @@ -1130,7 +1130,7 @@ do_btrfs_subvolume_show (const char *subvolume) return NULL; } - p = analyze_line(p, &key, &value, ':'); + p = analyze_line (p, &key, &value, ':'); } } @@ -1701,9 +1701,9 @@ do_btrfs_filesystem_defragment (const char *path, int flush, const char *compres if ((optargs_bitmask & GUESTFS_BTRFS_FILESYSTEM_DEFRAGMENT_FLUSH_BITMASK) && flush) ADD_ARG (argv, i, "-f"); if (optargs_bitmask & GUESTFS_BTRFS_FILESYSTEM_DEFRAGMENT_COMPRESS_BITMASK) { - if (STREQ(compre...
2015 Jun 16
1
[PATCH] btrfs: remove unused 'out' variables
...do_btrfs_balance_resume (const char *path) ADD_ARG (argv, i, path_buf); ADD_ARG (argv, i, NULL); - r = commandv (&out, &err, argv); + r = commandv (NULL, &err, argv); if (r == -1) { reply_with_error ("%s: %s", path, err); return -1; @@ -1604,7 +1591,6 @@ do_btrfs_filesystem_defragment (const char *path, int flush, const char *compres size_t i = 0; CLEANUP_FREE char *path_buf = NULL; CLEANUP_FREE char *err = NULL; - CLEANUP_FREE char *out = NULL; int r; path_buf = sysroot_path (path); @@ -1635,7 +1621,7 @@ do_btrfs_filesystem_defragment (const char *path, in...
2014 Dec 26
0
[PATCH 5/5] New API: btrfs_filesystem_set_label
...+++++++++++++++++++++++++++++++++ generator/actions.ml | 16 ++++++++++++++++ src/MAX_PROC_NR | 2 +- 3 files changed, 50 insertions(+), 1 deletion(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 32b1b05..f9e35be 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -1463,3 +1463,36 @@ do_btrfs_filesystem_defragment (const char *path) return 0; } + +int +do_btrfs_filesystem_set_label (const char *path, const char *label) +{ + const size_t MAX_ARGS = 64; + const char *argv[MAX_ARGS]; + size_t i = 0; + CLEANUP_FREE char *path_buf = NULL; + CLEANUP_FREE char *err = NULL; + CLEANUP_FREE char *out =...
2014 Dec 26
0
[PATCH 4/5] New API: add btrfs_filesystem_defragment
...+ src/MAX_PROC_NR | 2 +- 3 files changed, 53 insertions(+), 1 deletion(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 6c74892..32b1b05 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -1431,3 +1431,35 @@ do_btrfs_filesystem_get_label (const char *path) return out; } + +int +do_btrfs_filesystem_defragment (const char *path) +{ + const size_t MAX_ARGS = 64; + const char *argv[MAX_ARGS]; + size_t i = 0; + CLEANUP_FREE char *path_buf = NULL; + CLEANUP_FREE char *err = NULL; + CLEANUP_FREE char *out = NULL; + int r; + + path_buf = sysroot_path (path); + if (path_buf == NULL) { + reply_wi...
2015 Jan 16
0
Re: [PATCH 5/5] New API: btrfs_filesystem_set_label
...gt; > src/MAX_PROC_NR | 2 +- > > 3 files changed, 50 insertions(+), 1 deletion(-) > > > > diff --git a/daemon/btrfs.c b/daemon/btrfs.c > > index 32b1b05..f9e35be 100644 > > --- a/daemon/btrfs.c > > +++ b/daemon/btrfs.c > > @@ -1463,3 +1463,36 @@ do_btrfs_filesystem_defragment (const char *path) > > > > return 0; > > } > > + > > +int > > +do_btrfs_filesystem_set_label (const char *path, const char *label) > > +{ > > + const size_t MAX_ARGS = 64; > > + const char *argv[MAX_ARGS]; > > + size_t i = 0;...
2015 Mar 05
0
[PATCH 1/2] New API: btrfs_filesystem_show
....c | 26 ++++++++++++++++++++++++++ generator/actions.ml | 10 ++++++++++ src/MAX_PROC_NR | 2 +- 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index d4b3207..df2fbf6 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -1608,6 +1608,32 @@ do_btrfs_filesystem_defragment (const char *path, int flush, const char *compres return 0; } +char * +do_btrfs_filesystem_show (const char *device) +{ + const size_t MAX_ARGS = 64; + const char *argv[MAX_ARGS]; + size_t i = 0; + CLEANUP_FREE char *err = NULL; + char *out = NULL; + int r; + + ADD_ARG (argv, i, st...
2015 Mar 05
3
[PATCH 0/2] btrfs: add support to btrfs filesystem show
Chen Hanxiao (2): New API: btrfs_filesystem_show New API: btrfs_filesystem_show_all daemon/btrfs.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ generator/actions.ml | 21 +++++++++++++++++++++ src/MAX_PROC_NR | 2 +- 3 files changed, 73 insertions(+), 1 deletion(-) -- 2.1.0
2015 Jan 16
18
[PATCH 00/16] btrfs: add support to btrfs scrub, balance, rescue and inspect
Hi, This series adds new APIs to support btrfs scrub, balance, rescue and inspect. Some of them don't have tests because: - btrfs_scrub and btrfs_balance completes too early before we can test btrfs_scrub_cancel, btrfs_scrub_resume, btrfs_scrub_status, btrfs_balance_pause, btrfs_balance_cancel, btrfs_balance_resume and btrfs_balance_status. - can't
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...@ -1670,7 +1663,7 @@ do_btrfs_balance_resume (const char *path) return -1; } - ADD_ARG (argv, i, str_btrfs); + ADD_ARG (argv, i, "btrfs"); ADD_ARG (argv, i, "balance"); ADD_ARG (argv, i, "resume"); ADD_ARG (argv, i, path_buf); @@ -1702,7 +1695,7 @@ do_btrfs_filesystem_defragment (const char *path, int flush, const char *compres return -1; } - ADD_ARG (argv, i, str_btrfs); + ADD_ARG (argv, i, "btrfs"); ADD_ARG (argv, i, "filesystem"); ADD_ARG (argv, i, "defragment"); ADD_ARG (argv, i, "-r"); @@ -1742,7 +1735,7...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...@ -1670,7 +1666,7 @@ do_btrfs_balance_resume (const char *path) return -1; } - ADD_ARG (argv, i, str_btrfs); + ADD_ARG (argv, i, "btrfs"); ADD_ARG (argv, i, "balance"); ADD_ARG (argv, i, "resume"); ADD_ARG (argv, i, path_buf); @@ -1702,7 +1698,7 @@ do_btrfs_filesystem_defragment (const char *path, int flush, const char *compres return -1; } - ADD_ARG (argv, i, str_btrfs); + ADD_ARG (argv, i, "btrfs"); ADD_ARG (argv, i, "filesystem"); ADD_ARG (argv, i, "defragment"); ADD_ARG (argv, i, "-r"); @@ -1742,7 +1738,7...
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’