From ba5f32986c342795eb910e8d77b5a5756af049ce Mon Sep 17 00:00:00 2001 From: David Sterba Date: Mon, 26 Mar 2012 19:25:41 +0200 Subject: [PATCH 05/10] btrfs-progs: document balance in manpage Signed-off-by: David Sterba --- btrfs_cmds.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 71 insertions(+), 3 deletions(-) diff --git a/btrfs_cmds.c b/btrfs_cmds.c index 17c3f8e..a7231d0 100644 --- a/btrfs_cmds.c +++ b/btrfs_cmds.c @@ -1350,9 +1350,38 @@ static struct option balance_longopts[] = { { 0, 0, 0, 0} }; -/* - * [-d [filters]] [-m [filters]] [-s [filters]] [-vf] - */ +/**** man: btrfs filesystem balance start + * + * \Bbtrfs\b \Bfilesystem balance start\b \B[-d [filters]] [-m [filters]] [-s [filters]] [-vf]\b \I\i + * + * Balance chunks accross the devices on filesystem under \Ipath\i. Control + * operation by subcommands. + * + * \B-d\b apply filters on data block groups + * + * \B-m\b apply filters on metadata block groups + * + * \B-s\b apply filters on system block groups + * + * \B-f\b force operation on system block groups + * + * \B-v\b verbose, dupms filters at the end of operation + * + * \Ifilters\i may be a comma separated list of the following items, see section \BBALANCE FILTERS\b for more. + * + * \Bprofile\b=raid0|raid1|raid10|single|dup specify profiles, multiple allowed, note to escape the '|' from shell + * + * \Busage\b= process only block groups with usage above \Innn\i percent + * + * \Bdevid\b= process only block groups on device \Idevid\i + * + * \Bconvert\b=raid0|raid1|radi10|single|dup convert raid profile to the specified one (only one profile allowed) + * + * \Bvrange\b=[start]..[end] virtual block address space subset filter + * + * \Bdrange\b=[start]..[end] devid subset filter, it's tied to devid filter: we say balance out range [start..end) on a particular devid. + ****/ + int do_balance(int argc, char **argv) { int fd; @@ -1496,6 +1525,16 @@ int do_balance(int argc, char **argv) return 0; } +/**** man: btrfs filesystem balance pause + * + * \Bbtrfs\b \Bfilesystem balance pause\b \I\i + * + * Pause balance operation at the first possible occasion. + * + * Pause balance operation at the first possible occasion. This may block for a + * few minutes if the balance is in the middle of processing. + ****/ + int do_balance_pause(int argc, char **argv) { int fd; @@ -1522,6 +1561,16 @@ int do_balance_pause(int argc, char **argv) return 0; } +/**** man: btrfs filesystem balance cancel + * + * \Bbtrfs\b \Bfilesystem balance cancel\b \I\i + * + * Cancel balance operation at the first possible occasion. + * + * Cancel balance operation at the first possible occasion. This may block for + * a few minutes if the balance is in the middle of processing. + ****/ + int do_balance_cancel(int argc, char **argv) { int fd; @@ -1548,6 +1597,15 @@ int do_balance_cancel(int argc, char **argv) return 0; } +/**** man: btrfs filesystem balance resume + * + * \Bbtrfs\b \Bfilesystem balance resume\b \I\i + * + * Resume balance operation. + * + * Resume balance operation and continue from the last position. + ****/ + int do_balance_resume(int argc, char **argv) { int fd; @@ -1601,6 +1659,16 @@ static struct option balance_progress_longopts[] = { { 0, 0, 0, 0} }; +/**** man: btrfs filesystem balance status + * + * \Bbtrfs\b \Bfilesystem balance status\b [-v] \I\i + * + * Show status of running or paused balance operation. + * + * Show status of running or paused balance operation. + * + * \B-v\b verbose + ****/ int do_balance_progress(int argc, char **argv) { int fd; -- 1.7.6.233.gd79bc