Re: [PATCH 18/20] Btrfs-progs: fix magic return value in cmds-balance.c

2013-09-05 Thread Wang Shilong
Hi Illya, On 09/05/2013 12:26 AM, Ilya Dryomov wrote: Hi Wang, Thank you for doing the grunt work, it's been a long standing todo. See the comments below. On Wed, Sep 4, 2013 at 6:22 PM, Wang Shilong wangshilong1...@gmail.com wrote: From: Wang Shilong wangsl.f...@cn.fujitsu.com If there is

Re: [PATCH 18/20] Btrfs-progs: fix magic return value in cmds-balance.c

2013-09-05 Thread Stefan Behrens
On Thu, 05 Sep 2013 15:44:11 +0800, Wang Shilong wrote: [..] @@ -297,9 +305,10 @@ static int do_balance(const char *path, struct btrfs_ioctl_balance_args *args, DIR *dirstream = NULL; fd = open_file_or_dir(path, dirstream); + e = errno; if (fd 0) {

Re: [PATCH 18/20] Btrfs-progs: fix magic return value in cmds-balance.c

2013-09-05 Thread Wang Shilong
On 09/05/2013 04:21 PM, Stefan Behrens wrote: On Thu, 05 Sep 2013 15:44:11 +0800, Wang Shilong wrote: [..] @@ -297,9 +305,10 @@ static int do_balance(const char *path, struct btrfs_ioctl_balance_args *args, DIR *dirstream = NULL; fd = open_file_or_dir(path, dirstream); +

[PATCH 18/20] Btrfs-progs: fix magic return value in cmds-balance.c

2013-09-04 Thread Wang Shilong
From: Wang Shilong wangsl.f...@cn.fujitsu.com If there is no balance in progress.resume/pause/cancel will return 2. For usage or syntal errors will return 1. 0 means operations return successfully. Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com --- cmds-balance.c | 93

Re: [PATCH 18/20] Btrfs-progs: fix magic return value in cmds-balance.c

2013-09-04 Thread Ilya Dryomov
Hi Wang, Thank you for doing the grunt work, it's been a long standing todo. See the comments below. On Wed, Sep 4, 2013 at 6:22 PM, Wang Shilong wangshilong1...@gmail.com wrote: From: Wang Shilong wangsl.f...@cn.fujitsu.com If there is no balance in progress.resume/pause/cancel will return