[PATCH 0/2] btrfs-progs: Introduce devel namespace

2013-08-06 Thread David Sterba
Add namespace for features under development and the first user. David Sterba (2): btrfs-progs: introduce command namespace for development features btrfs-progs: move chunk-recover command to devel namespace btrfs.c | 26 +- 1 file changed, 25 insertions(+), 1

[PATCH 1/2] btrfs-progs: introduce command namespace for development features

2013-08-06 Thread David Sterba
We'd like to make it easier to preview a new feature and remove the burden to invent sane user interface (command name, placement, arguments, man) from the beginning. For this purpose the developer are free to use the 1st level namespace called '_'. It will be hidden from regular btrfs help output

[PATCH 2/2] btrfs-progs: move chunk-recover command to devel namespace

2013-08-06 Thread David Sterba
Signed-off-by: David Sterba dste...@suse.cz --- btrfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/btrfs.c b/btrfs.c index dff0d70..4bbce48 100644 --- a/btrfs.c +++ b/btrfs.c @@ -252,6 +252,7 @@ const struct cmd_group devel_features_cmd_group = { NOTE: you have to

Re: [PATCH 09/10] btrfs-progs: Fix the return value of btrfs-map-logical

2013-08-06 Thread David Sterba
On Thu, Aug 01, 2013 at 01:35:33PM +0800, Wang Shilong wrote: From: Qu Wenruo quwen...@cn.fujitsu.com The ret variant in the main function is not changed so even problems happen, return value is still 0. The patch fixs the minor bug and return 1 if any problems happen. Please don't mix code

Re: [PATCH 09/10] btrfs-progs: Fix the return value of btrfs-map-logical

2013-08-06 Thread Wang Shilong
On Thu, Aug 01, 2013 at 01:35:33PM +0800, Wang Shilong wrote: From: Qu Wenruo quwen...@cn.fujitsu.com The ret variant in the main function is not changed so even problems happen, return value is still 0. The patch fixs the minor bug and return 1 if any problems happen. Please don't mix

Re: [PATCH 00/11 v2 (resend)] btrfs-progs: coalesce of patches

2013-08-06 Thread anand jain
On 06/08/2013 01:36, David Sterba wrote: On Mon, Jul 15, 2013 at 01:30:46PM +0800, Anand Jain wrote: Anand Jain (11): btrfs-progs: btrfs_scan_for_fsid doesn't need all the arguments btrfs-progs: label option in btrfs filesystem show is not coded btrfs-progs: update device scan usage

Re: [PATCH 01/10] Btrfs-progs: add missing man page information for btrfsck

2013-08-06 Thread David Sterba
On Thu, Aug 01, 2013 at 01:35:25PM +0800, Wang Shilong wrote: +.SH COPYRIGHT +Copyright \(co 2013 Fujitsu, Inc. +License GPLv3: GNU GPL version 3 http://gnu.org/licenses/gpl.html. +.br +This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the

Re: [PROGS PATCH] Import btrfs-extent-same

2013-08-06 Thread David Sterba
. btrfs dedup files dir/* Liu Bo's dedup patch is in today's integration snapshot http://repo.or.cz/w/btrfs-progs-unstable/devel.git/shortlog/refs/heads/integration-20130806-2 you can use it as a base. thanks, david -- To unsubscribe from this list: send the line unsubscribe linux-btrfs

Re: Heavy memory leak when using quota groups

2013-08-06 Thread Tomasz Chmielewski
On Tue, 06 Aug 2013 07:24:26 +0200 Arne Jansen sensi...@gmx.net wrote: On 05.08.2013 18:35, Tomasz Chmielewski wrote: I am trying to use qgroups functionality with a basic random-write workload, it constantly keeps leaking memory within few minutes of IO, there is either out-of-memory

Re: [PATCH 1/2] btrfs-progs: introduce command namespace for development features

2013-08-06 Thread Zach Brown
On Tue, Aug 06, 2013 at 02:25:20PM +0200, David Sterba wrote: We'd like to make it easier to preview a new feature and remove the burden to invent sane user interface (command name, placement, arguments, man) from the beginning. My biggest worry about this is that it complicates the

[PATCH RFC] Btrfs-progs: allow btrfstune to set persistent mount options

2013-08-06 Thread Filipe David Borba Manana
This is the complement to the corresponding kernel patch that adds support for permanent options. NOTE: Like the corresponding kernel patch, this is a WIP with the goal o gathering feedback. Signed-off-by: Filipe David Borba Manana fdman...@gmail.com --- btrfstune.c | 105

[PATCH 2/4] btrfs_ioctl_clone: Move clone code into it's own function

2013-08-06 Thread Mark Fasheh
There's some 250+ lines here that are easily encapsulated into their own function. I don't change how anything works here, just create and document the new btrfs_clone() function from btrfs_ioctl_clone() code. Signed-off-by: Mark Fasheh mfas...@suse.de --- fs/btrfs/ioctl.c | 232

[PATCH 0/4] btrfs: out-of-band (aka offline) dedupe v4

2013-08-06 Thread Mark Fasheh
Hi, The following series of patches implements in btrfs an ioctl to do out-of-band deduplication of file extents. To be clear, this means that the file system is mounted and running, but the dedupe is not done during file writes, but after the fact when some userspace software initiates a

[PATCH 1/4] btrfs: abtract out range locking in clone ioctl()

2013-08-06 Thread Mark Fasheh
The range locking in btrfs_ioctl_clone is trivially broken out into it's own function. This reduces the complexity of btrfs_ioctl_clone() by a small bit and makes that locking code available to future functions in fs/btrfs/ioctl.c Signed-off-by: Mark Fasheh mfas...@suse.de --- fs/btrfs/ioctl.c |

[PATCH 3/4] btrfs: Introduce extent_read_full_page_nolock()

2013-08-06 Thread Mark Fasheh
We want this for btrfs_extent_same. Basically readpage and friends do their own extent locking but for the purposes of dedupe, we want to have both files locked down across a set of readpage operations (so that we can compare data). Introduce this variant and a flag which can be set for

[PATCH 4/4] btrfs: offline dedupe

2013-08-06 Thread Mark Fasheh
This patch adds an ioctl, BTRFS_IOC_FILE_EXTENT_SAME which will try to de-duplicate a list of extents across a range of files. Internally, the ioctl re-uses code from the clone ioctl. This avoids rewriting a large chunk of extent handling code. Userspace passes in an array of file, offset pairs

Re: [PATCH] btrfs-progs: don't overrun answer array in cmds-chunk.c

2013-08-06 Thread Zach Brown
If you're in here, want to reimplement this thing in a few lines of scanf(%s) and strcasecmp()? I can give it a go if you don't want to. I think it is better that moving it to utils.c because the other commands may use it in the future. I disagree. Let's stick to only writing the code

Re: [PATCH 4/4] btrfs: offline dedupe

2013-08-06 Thread Zach Brown
On Tue, Aug 06, 2013 at 11:42:51AM -0700, Mark Fasheh wrote: This patch adds an ioctl, BTRFS_IOC_FILE_EXTENT_SAME which will try to de-duplicate a list of extents across a range of files. This addresses all my previous issues (save the interface that we've aggreed to disagree on). Thanks for

Re: [PATCH RFC] Btrfs: add support for persistent mount options

2013-08-06 Thread Eric Sandeen
On 8/6/13 1:27 PM, Filipe David Borba Manana wrote: This change allows for most mount options to be persisted in the filesystem, and be applied when the filesystem is mounted. If the same options are specified at mount time, the persisted values for those options are ignored. The only

Re: [PATCH v2 1/2] xfstests: add fssum tool

2013-08-06 Thread Josef Bacik
On Wed, Jul 24, 2013 at 05:07:28PM +0200, Jan Schmidt wrote: fssum is a tool to build a recursive checksum for a file system. The home repository of fssum is git://git.kernel.org/pub/scm/linux/kernel/git/arne/far-progs.git It is added as an optional target, because it depends on glibc

Re: [PATCH v2 2/2] xfstests btrfs/316: test send / receive

2013-08-06 Thread Josef Bacik
On Wed, Jul 24, 2013 at 05:07:29PM +0200, Jan Schmidt wrote: Basic send / receive functionality test for btrfs. Requires current version of fsstress built (-x support). Relies on fssum tool but can skip the test if it failed to build. Signed-off-by: Jan Schmidt list@jan-o-sch.net ---

Re: [PATCH RFC] Btrfs: add support for persistent mount options

2013-08-06 Thread Filipe David Manana
On Tue, Aug 6, 2013 at 9:37 PM, Eric Sandeen sand...@redhat.com wrote: On 8/6/13 1:27 PM, Filipe David Borba Manana wrote: This change allows for most mount options to be persisted in the filesystem, and be applied when the filesystem is mounted. If the same options are specified at mount

[PATCH] Btrfs: check our parent dir when doing a compare send

2013-08-06 Thread Josef Bacik
When doing a send with a parent subvol we will check to see if the file we are acting on is being overwritten and move it if we think it may be needed further down the line during the send. We check this by checking its directory and making sure it existed in the parent and making sure the file

Re: [PATCH RFC] Btrfs: add support for persistent mount options

2013-08-06 Thread Eric Sandeen
On 8/6/13 3:45 PM, Filipe David Manana wrote: On Tue, Aug 6, 2013 at 9:37 PM, Eric Sandeen sand...@redhat.com wrote: On 8/6/13 1:27 PM, Filipe David Borba Manana wrote: This change allows for most mount options to be persisted in the filesystem, and be applied when the filesystem is mounted.

[PATCH] Btrfs: check our parent dir when doing a compare send V2

2013-08-06 Thread Josef Bacik
When doing a send with a parent subvol we will check to see if the file we are acting on is being overwritten and move it if we think it may be needed further down the line during the send. We check this by checking its directory and making sure it existed in the parent and making sure the file

[PATCH 0/2] btrfs-progs: more statics removals

2013-08-06 Thread Eric Sandeen
2 patches, one for shared kernel files, one for pure userspace. In kernelspace, lots of unused functions purged. Some functions which could be static are left alone if they aren't marked static in kernelspace. userspace only has a couple removals, mostly just marking static removing prototypes

[PATCH 1/2] btrfs-progs: mark static remove unused from shared kernel code

2013-08-06 Thread Eric Sandeen
In files copied from the kernel, mark many functions as static, and remove any resulting dead code. Some functions are left unmarked if they aren't static in the kernel tree. Signed-off-by: Eric Sandeen sand...@redhat.com --- ctree.c|2 ctree.h| 43

[PATCH 2/2] btrfs-progs: mark static remove unused from non-kernel code

2013-08-06 Thread Eric Sandeen
Mark many functions as static, and remove any resulting dead code. Signed-off-by: Eric Sandeen sand...@redhat.com --- btrfs-convert.c |8 btrfs-find-root.c |2 +- btrfs-list.c| 10 +- btrfs-list.h|3 --- btrfs-map-logical.c |4 ++--

Re: [PATCH RFC] Btrfs: add support for persistent mount options

2013-08-06 Thread Duncan
Eric Sandeen posted on Tue, 06 Aug 2013 15:37:30 -0500 as excerpted: On 8/6/13 1:27 PM, Filipe David Borba Manana wrote: This change allows for most mount options to be persisted in the filesystem, and be applied when the filesystem is mounted. If the same options are specified at mount time,

Re: [PATCH RFC] Btrfs: add support for persistent mount options

2013-08-06 Thread Eric Sandeen
On 8/6/13 8:20 PM, Duncan wrote: Eric Sandeen posted on Tue, 06 Aug 2013 15:37:30 -0500 as excerpted: On 8/6/13 1:27 PM, Filipe David Borba Manana wrote: This change allows for most mount options to be persisted in the filesystem, and be applied when the filesystem is mounted. If the same

Re: [PATCH RFC] Btrfs: add support for persistent mount options

2013-08-06 Thread Eric Sandeen
On 8/6/13 1:27 PM, Filipe David Borba Manana wrote: This change allows for most mount options to be persisted in the filesystem, and be applied when the filesystem is mounted. If the same options are specified at mount time, the persisted values for those options are ignored. I thought the

Re: [PATCH 1/2] btrfs-progs: introduce command namespace for development features

2013-08-06 Thread Anand Jain
Further there is benefit of having newer subcommands in the master branch - it gets visibility. However if we are trying to solve the problem of it not being end user ready then there can be a warning message about it when the user uses it or sees it. I see some of online shops tagging

Re: [PATCH RFC] Btrfs: add support for persistent mount options

2013-08-06 Thread Filipe David Manana
On Tue, Aug 6, 2013 at 10:05 PM, Eric Sandeen sand...@redhat.com wrote: On 8/6/13 3:45 PM, Filipe David Manana wrote: On Tue, Aug 6, 2013 at 9:37 PM, Eric Sandeen sand...@redhat.com wrote: On 8/6/13 1:27 PM, Filipe David Borba Manana wrote: This change allows for most mount options to be

Re: [PATCH RFC] Btrfs: add support for persistent mount options

2013-08-06 Thread Filipe David Manana
On Wed, Aug 7, 2013 at 4:04 AM, Eric Sandeen sand...@redhat.com wrote: On 8/6/13 1:27 PM, Filipe David Borba Manana wrote: This change allows for most mount options to be persisted in the filesystem, and be applied when the filesystem is mounted. If the same options are specified at mount

Re: [PATCH 2/2] btrfs-progs: mark static remove unused from non-kernel code

2013-08-06 Thread Eric Sandeen
On 8/6/13 8:05 PM, Eric Sandeen wrote: Mark many functions as static, and remove any resulting dead code. Signed-off-by: Eric Sandeen sand...@redhat.com --- ... Actually, what the heck was this (note, this patch was against kdave's integration tree): diff --git a/send-utils.c

[PATCH 3/3] Btrfs: remove reduplicate check when disabling quota

2013-08-06 Thread Wang Shilong
We have checked 'quota_root' with qgroup_ioctl_lock held before,So here the check is reduplicate, remove it. Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com Reviewed-by: Miao Xie mi...@cn.fujitsu.com --- fs/btrfs/qgroup.c | 5 - 1 file changed, 5 deletions(-) diff --git

[PATCH 2/3] Btrfs: move btrfs_free_qgroup_config() out of spin_lock and fix comments

2013-08-06 Thread Wang Shilong
btrfs_free_qgroup_config() is not only called by open/close_ctree(),but also btrfs_disable_quota().And for btrfs_disable_quota(),we have set 'quota_root' to be null before calling btrfs_free_qgroup_config(),so it is safe to cleanup in-memory structures without lock held. Signed-off-by: Wang

[PATCH 1/3] Btrfs: fix oops when writing dirty qgroups to disk

2013-08-06 Thread Wang Shilong
When disabling quota, we should clear out list 'dirty_qgroups',otherwise, we will get oops if enabling quota again. Fix this by abstracting similar code from del_qgroup_rb(). Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com Reviewed-by: Miao Xie mi...@cn.fujitsu.com --- fs/btrfs/qgroup.c |

Re: [PATCH 1/3] Btrfs: fix oops when writing dirty qgroups to disk

2013-08-06 Thread Wang Shilong
On 08/07/2013 01:12 PM, Wang Shilong wrote: When disabling quota, we should clear out list 'dirty_qgroups',otherwise, we will get oops if enabling quota again. Fix this by abstracting similar code from del_qgroup_rb(). Hello Arne, Would you pleae review this patch and other cleanup patches, i

[v2 1/8] Btrfs-progs: add missing man page information for btrfsck

2013-08-06 Thread Wang Shilong
Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- V1-V2: remove wrong copyright information --- man/btrfsck.8.in | 29 - 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/man/btrfsck.8.in

[v2 5/8] Btrfs-progs: add man page information for btrfs-convert

2013-08-06 Thread Wang Shilong
Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- V1-V2: GPLv3-GPLv2 --- man/Makefile | 3 ++- man/btrfs-convert.8.in | 39 +++ 2 files changed, 41 insertions(+), 1 deletion(-) create mode

[v2 6/8] Btrfs-progs: add missing man page for btrfstune

2013-08-06 Thread Wang Shilong
Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- V1-V2: GPLv3-GPLv2 --- man/Makefile | 2 +- man/btrfstune.8.in | 37 + 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644

[v2 4/8] Btrfs-progs: add man page information for btrfs-find-root

2013-08-06 Thread Wang Shilong
Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- V1-V2: GPLv3-GPLv2 --- man/Makefile | 2 +- man/btrfs-find-root.8.in | 36 man/btrfs-show-super.8.in | 4 ++-- 3 files changed, 39

[v2 8/8] Btrfs-progs: add missing man page for btrfs-map-logical

2013-08-06 Thread Wang Shilong
Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- V1-V2: GPLv3-GPLv2 --- man/Makefile | 2 +- man/btrfs-map-logical.8.in | 39 +++ 2 files changed, 40 insertions(+), 1 deletion(-) create

[v2 3/8] Btrfs-progs: add missing man page for btrfs-show-super

2013-08-06 Thread Wang Shilong
Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- V1-V2: GPLv3-GPLv2 --- man/Makefile | 2 +- man/btrfs-show-super.8.in | 36 2 files changed, 37 insertions(+), 1 deletion(-) create mode

[v2 7/8] Btrfs-progs: add missing man page information for btrfs-zero-log

2013-08-06 Thread Wang Shilong
Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- V1-V2: GPLv3-GPLv2 --- man/Makefile| 2 +- man/btrfs-zero-log.8.in | 29 + 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644

[v2 2/8] Btrfs-progs: add missing man information for btrfs-debug-tree

2013-08-06 Thread Wang Shilong
Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com --- V1-V2: GPLv3-GPLv2 --- btrfs-debug-tree.c| 2 +- man/Makefile | 3 ++- man/btrfs-debug-tree.8.in | 41 + 3 files changed, 44