Re: [PATCH] btrfs-progs: add option to run balance as daemon

2016-07-26 Thread Austin S. Hemmelgarn
On 2016-07-26 13:07, David Sterba wrote: On Mon, Jul 11, 2016 at 10:44:30AM +0900, Satoru Takeuchi wrote: + chdir("/"); You should check the return value of chdir(). Otherwise we get the following warning message at the build time. Can we actually fail

Re: [PATCH] btrfs-progs: add option to run balance as daemon

2016-07-26 Thread David Sterba
On Mon, Jul 11, 2016 at 10:44:30AM +0900, Satoru Takeuchi wrote: > > + chdir("/"); > > You should check the return value of chdir(). Otherwise > we get the following warning message at the build time. Can we actually fail to change directory to '/' ? Otherwise I

Re: [PATCH] btrfs-progs: add option to run balance as daemon

2016-07-13 Thread Austin S. Hemmelgarn
On 2016-07-13 12:38, David Sterba wrote: On Tue, Jun 21, 2016 at 11:16:59AM -0400, Austin S. Hemmelgarn wrote: Currently, balance operations are run synchronously in the foreground. This is nice for interactive management, but is kind of crappy when you start looking at automation and similar

Re: [PATCH] btrfs-progs: add option to run balance as daemon

2016-07-13 Thread David Sterba
On Tue, Jun 21, 2016 at 11:16:59AM -0400, Austin S. Hemmelgarn wrote: > Currently, balance operations are run synchronously in the foreground. > This is nice for interactive management, but is kind of crappy when you > start looking at automation and similar things. Yeah, people have been

Re: [PATCH] btrfs-progs: add option to run balance as daemon

2016-07-13 Thread Austin S. Hemmelgarn
On 2016-07-13 00:39, Andrei Borzenkov wrote: 12.07.2016 15:25, Austin S. Hemmelgarn пишет: I'm not changing my init system just to add functionality that should already exist in btrfs-progs. The fact that the balance ioctl is synchronous was a poor design choice, and we need to provide the

Re: [PATCH] btrfs-progs: add option to run balance as daemon

2016-07-12 Thread Andrei Borzenkov
12.07.2016 15:25, Austin S. Hemmelgarn пишет: > > I'm not changing my init system just to add functionality that should > already exist in btrfs-progs. The fact that the balance ioctl is > synchronous was a poor design choice, and we need to provide the option > to work around that independent

Re: [PATCH] btrfs-progs: add option to run balance as daemon

2016-07-12 Thread Austin S. Hemmelgarn
On 2016-07-12 11:22, Duncan wrote: Austin S. Hemmelgarn posted on Tue, 12 Jul 2016 08:25:24 -0400 as excerpted: As far as daemonization, I have no man-page called daemon in section seven, yet I have an up-to-date upstream copy of the Linux man pages. My guess is that this is a systemd man

Re: [PATCH] btrfs-progs: add option to run balance as daemon

2016-07-12 Thread Duncan
Austin S. Hemmelgarn posted on Tue, 12 Jul 2016 08:25:24 -0400 as excerpted: > As far as daemonization, I have no man-page called daemon in section > seven, yet I have an up-to-date upstream copy of the Linux man pages. My > guess is that this is a systemd man page, which in turn means it does a

Re: [PATCH] btrfs-progs: add option to run balance as daemon

2016-07-12 Thread Austin S. Hemmelgarn
On 2016-07-11 12:58, Tomasz Torcz wrote: On Mon, Jul 11, 2016 at 07:17:28AM -0400, Austin S. Hemmelgarn wrote: On 2016-07-11 03:26, Tomasz Torcz wrote: On Tue, Jun 21, 2016 at 11:16:59AM -0400, Austin S. Hemmelgarn wrote: Currently, balance operations are run synchronously in the foreground.

Re: [PATCH] btrfs-progs: add option to run balance as daemon

2016-07-11 Thread Tomasz Torcz
On Mon, Jul 11, 2016 at 07:17:28AM -0400, Austin S. Hemmelgarn wrote: > On 2016-07-11 03:26, Tomasz Torcz wrote: > > On Tue, Jun 21, 2016 at 11:16:59AM -0400, Austin S. Hemmelgarn wrote: > > > Currently, balance operations are run synchronously in the foreground. > > > This is nice for interactive

Re: [PATCH] btrfs-progs: add option to run balance as daemon

2016-07-11 Thread Austin S. Hemmelgarn
On 2016-07-11 03:26, Tomasz Torcz wrote: On Tue, Jun 21, 2016 at 11:16:59AM -0400, Austin S. Hemmelgarn wrote: Currently, balance operations are run synchronously in the foreground. This is nice for interactive management, but is kind of crappy when you start looking at automation and similar

Re: [PATCH] btrfs-progs: add option to run balance as daemon

2016-07-11 Thread Tomasz Torcz
On Tue, Jun 21, 2016 at 11:16:59AM -0400, Austin S. Hemmelgarn wrote: > Currently, balance operations are run synchronously in the foreground. > This is nice for interactive management, but is kind of crappy when you > start looking at automation and similar things. It can be done with

Re: [PATCH] btrfs-progs: add option to run balance as daemon

2016-07-10 Thread Satoru Takeuchi
On 2016/06/22 0:16, Austin S. Hemmelgarn wrote: > Currently, balance operations are run synchronously in the foreground. > This is nice for interactive management, but is kind of crappy when you > start looking at automation and similar things. > > This patch adds an option to `btrfs balance

[PATCH] btrfs-progs: add option to run balance as daemon

2016-06-21 Thread Austin S. Hemmelgarn
Currently, balance operations are run synchronously in the foreground. This is nice for interactive management, but is kind of crappy when you start looking at automation and similar things. This patch adds an option to `btrfs balance start` to tell it to daemonize prior to running the balance