Re: [PATCH 2/2] Btrfs-progs: add mount-option command

2012-09-20 Thread David Sterba
On Wed, Sep 19, 2012 at 05:32:16PM +0900, Hidetoshi Seto wrote: (2012/09/18 11:31), Miao Xie wrote: On tue, 18 Sep 2012 10:30:17 +0900, Hidetoshi Seto wrote: This patch adds mount-option command. The command can set/get default mount options. Now, the command can set/get 24 options.

Re: R: [PATCH 2/2] Btrfs-progs: add mount-option command

2012-09-20 Thread David Sterba
On Tue, Sep 18, 2012 at 12:03:47PM +0200, Goffredo Baroncelli kreij...@libero.it wrote: Why it was not provided a way to clear a *single* flag ? To me it seems a bit too long to clear all the flag (btrfs mount-option clear) and then set the right one. As user interface I suggest something

Re: R: [PATCH 2/2] Btrfs-progs: add mount-option command

2012-09-19 Thread Hidetoshi Seto
...@jp.fujitsu.com Data: 18/09/2012 3.30 A: linux-btrfs@vger.kernel.org Ogg: [PATCH 2/2] Btrfs-progs: add mount-option command [...] +/* + * Flags for mount options. + * + * Note: don't forget to add new options to btrfs_show_options() + */ +#define BTRFS_MOUNT_NODATASUM (1

Re: [PATCH 2/2] Btrfs-progs: add mount-option command

2012-09-19 Thread Hidetoshi Seto
(2012/09/18 11:31), Miao Xie wrote: On tue, 18 Sep 2012 10:30:17 +0900, Hidetoshi Seto wrote: This patch adds mount-option command. The command can set/get default mount options. Now, the command can set/get 24 options. These options are equal to mount options which store in

Re: [PATCH 2/2] Btrfs-progs: add mount-option command

2012-09-19 Thread Hidetoshi Seto
(2012/09/18 21:30), David Sterba wrote: On Tue, Sep 18, 2012 at 10:30:17AM +0900, Hidetoshi Seto wrote: ... So, you're basically implementing subset of the whole-filesystem options. As has been mentioned, alternate way is to use the 'properties' interface as a global entry point from the

R: [PATCH 2/2] Btrfs-progs: add mount-option command

2012-09-18 Thread Goffredo Baroncelli kreij...@libero.it
: [PATCH 2/2] Btrfs-progs: add mount-option command [...] +/* + * Flags for mount options. + * + * Note: don't forget to add new options to btrfs_show_options() + */ +#define BTRFS_MOUNT_NODATASUM (1 0) +#define BTRFS_MOUNT_NODATACOW (1 1) +#define BTRFS_MOUNT_NOBARRIER (1 2

R: Re: [PATCH 2/2] Btrfs-progs: add mount-option command

2012-09-18 Thread Goffredo Baroncelli kreij...@libero.it
Da: r...@romanrm.ru Data: 18/09/2012 6.19 A: mi...@cn.fujitsu.com Cc: Hidetoshi Setoseto.hideto...@jp.fujitsu.com, linux-btrfs@vger.kernel. org Ogg: Re: [PATCH 2/2] Btrfs-progs: add mount-option command On Tue, 18 Sep 2012 10:31:41 +0800 Miao Xie mi...@cn.fujitsu.com wrote: On tue, 18 Sep

Re: [PATCH 2/2] Btrfs-progs: add mount-option command

2012-09-18 Thread David Sterba
On Tue, Sep 18, 2012 at 09:19:40AM +0100, Hugo Mills wrote: On Tue, Sep 18, 2012 at 10:19:30AM +0600, Roman Mamedov wrote: On Tue, 18 Sep 2012 10:31:41 +0800 Miao Xie mi...@cn.fujitsu.com wrote: On tue, 18 Sep 2012 10:30:17 +0900, Hidetoshi Seto wrote: This patch adds mount-option

Re: [PATCH 2/2] Btrfs-progs: add mount-option command

2012-09-18 Thread David Sterba
On Tue, Sep 18, 2012 at 10:30:17AM +0900, Hidetoshi Seto wrote: Now, the command can set/get 24 options. These options are equal to mount options which store in fs_info/mount-opt. Some of the options do not IMO fit for being default, like DEGRADED, maybe RECOVERY, maybe SKIP_BALANCE. +

[PATCH 2/2] Btrfs-progs: add mount-option command

2012-09-17 Thread Hidetoshi Seto
This patch adds mount-option command. The command can set/get default mount options. Now, the command can set/get 24 options. These options are equal to mount options which store in fs_info/mount-opt. Signed-off-by: Hidetoshi Seto seto.hideto...@jp.fujitsu.com --- Makefile |5 +-

Re: [PATCH 2/2] Btrfs-progs: add mount-option command

2012-09-17 Thread Miao Xie
On tue, 18 Sep 2012 10:30:17 +0900, Hidetoshi Seto wrote: This patch adds mount-option command. The command can set/get default mount options. Now, the command can set/get 24 options. These options are equal to mount options which store in fs_info/mount-opt. I don't think we need implement a

Re: [PATCH 2/2] Btrfs-progs: add mount-option command

2012-09-17 Thread Roman Mamedov
On Tue, 18 Sep 2012 10:31:41 +0800 Miao Xie mi...@cn.fujitsu.com wrote: On tue, 18 Sep 2012 10:30:17 +0900, Hidetoshi Seto wrote: This patch adds mount-option command. The command can set/get default mount options. Now, the command can set/get 24 options. These options are equal to mount