Re: [PATCH RFC] btrfs: send: Disable clone detection

2016-07-26 Thread Filipe Manana
On Tue, Jul 26, 2016 at 1:57 AM, Qu Wenruo wrote: > > > At 07/25/2016 09:48 PM, Filipe Manana wrote: >> >> On Mon, Jul 25, 2016 at 8:19 AM, Qu Wenruo >> wrote: >>> >>> This patch will disable clone detection of send. >>> >>> The main problem of clone detetion in send is its memory usage and long

Re: Any suggestions for thousands of disk image snapshots ?

2016-07-26 Thread Kurt Seo
2016-07-26 5:49 GMT+09:00 Chris Murphy : > On Mon, Jul 25, 2016 at 1:25 AM, Kurt Seo > wrote: >> Hi all >> >> >> I am currently running a project for building servers with btrfs. >> Purposes of servers are exporting disk images through iscsi targets >> and disk images are generated from btrfs s

Re: [PATCH RFC] btrfs: send: Disable clone detection

2016-07-26 Thread Qu Wenruo
At 07/26/2016 05:28 PM, Filipe Manana wrote: On Tue, Jul 26, 2016 at 1:57 AM, Qu Wenruo wrote: At 07/25/2016 09:48 PM, Filipe Manana wrote: On Mon, Jul 25, 2016 at 8:19 AM, Qu Wenruo wrote: This patch will disable clone detection of send. The main problem of clone detetion in send is

Re: [PATCH RFC] btrfs: send: Disable clone detection

2016-07-26 Thread Qu Wenruo
Some typo fixes: On 07/26/2016 06:04 PM, Qu Wenruo wrote: At 07/26/2016 05:28 PM, Filipe Manana wrote: On Tue, Jul 26, 2016 at 1:57 AM, Qu Wenruo wrote: At 07/25/2016 09:48 PM, Filipe Manana wrote: On Mon, Jul 25, 2016 at 8:19 AM, Qu Wenruo wrote: [snipped] And without the test of d

Re: [PATCH RFC] btrfs: send: Disable clone detection

2016-07-26 Thread Filipe Manana
On Tue, Jul 26, 2016 at 11:04 AM, Qu Wenruo wrote: > > > At 07/26/2016 05:28 PM, Filipe Manana wrote: >> >> On Tue, Jul 26, 2016 at 1:57 AM, Qu Wenruo >> wrote: >>> >>> >>> >>> At 07/25/2016 09:48 PM, Filipe Manana wrote: On Mon, Jul 25, 2016 at 8:19 AM, Qu Wenruo wrote:

Re: [PATCH RFC] btrfs: send: Disable clone detection

2016-07-26 Thread Qu Wenruo
On 07/26/2016 06:57 PM, Filipe Manana wrote: On Tue, Jul 26, 2016 at 11:04 AM, Qu Wenruo wrote: At 07/26/2016 05:28 PM, Filipe Manana wrote: On Tue, Jul 26, 2016 at 1:57 AM, Qu Wenruo wrote: At 07/25/2016 09:48 PM, Filipe Manana wrote: On Mon, Jul 25, 2016 at 8:19 AM, Qu Wenruo w

[PATCH v3] btrfs: should block unused block groups deletion work when allocating data space

2016-07-26 Thread Wang Xiaoguang
cleaner_kthread() may run at any time, in which it'll call btrfs_delete_unused_bgs() to delete unused block groups. Because this work is asynchronous, it may also result in false ENOSPC error. Please see below race window: CPU1 | CPU2

[PULL] Btrfs for 4.8, part 1

2016-07-26 Thread David Sterba
Hi, please pull the following patches to 4.8. There are mostly small independent fixes or cleanups. The branch is based on your current 'next' because of patch dependencies. I don't want to start it on 4.7-rc6 as the merge conflicts would be many and not trivial. There are a few more patches that

Re: Any suggestions for thousands of disk image snapshots ?

2016-07-26 Thread Chris Murphy
On Tue, Jul 26, 2016 at 3:37 AM, Kurt Seo wrote: > 2016-07-26 5:49 GMT+09:00 Chris Murphy : >> On Mon, Jul 25, 2016 at 1:25 AM, Kurt Seo >> wrote: >>> Hi all >>> >>> >>> I am currently running a project for building servers with btrfs. >>> Purposes of servers are exporting disk images through

Re: [PATCH] Btrfs: fix memory leak of reloc_root

2016-07-26 Thread David Sterba
On Tue, Jul 19, 2016 at 03:36:05PM -0700, Liu Bo wrote: > When some critical errors occur and FS would be flipped into RO, > if we have an on-going balance, we can end up with a memory leak > of root->reloc_root since btrfs_drop_snapshots() bails out > without freeing reloc_root at the very early s

Re: [PATCH] btrfs: backref: Fix soft lockup in __merge_refs function

2016-07-26 Thread David Sterba
On Wed, Jul 20, 2016 at 03:04:18PM +0800, Qu Wenruo wrote: > Signed-off-by: Qu Wenruo > --- > fs/btrfs/backref.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c > index 8bb3509..4197610d 100644 > --- a/fs/btrfs/backref.c > +++ b/fs/btrfs/backref.c

Re: Any suggestions for thousands of disk image snapshots ?

2016-07-26 Thread Austin S. Hemmelgarn
On 2016-07-26 10:42, Chris Murphy wrote: On Tue, Jul 26, 2016 at 3:37 AM, Kurt Seo wrote: 2016-07-26 5:49 GMT+09:00 Chris Murphy : On Mon, Jul 25, 2016 at 1:25 AM, Kurt Seo wrote: Hi all I am currently running a project for building servers with btrfs. Purposes of servers are exporting d

Re: [PATCH v3] btrfs: should block unused block groups deletion work when allocating data space

2016-07-26 Thread Josef Bacik
On 07/26/2016 08:04 AM, Wang Xiaoguang wrote: cleaner_kthread() may run at any time, in which it'll call btrfs_delete_unused_bgs() to delete unused block groups. Because this work is asynchronous, it may also result in false ENOSPC error. Please see below race window: CPU1

Re: [PATCH] Btrfs: add ASSERT for block group's memory leak

2016-07-26 Thread David Sterba
On Wed, Jul 20, 2016 at 05:33:44PM -0700, Liu Bo wrote: > This adds several ASSERT()' s to report memory leak of block group cache. > > Signed-off-by: Liu Bo Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...

Re: [PATCH V20 01/19] Btrfs: subpage-blocksize: Fix whole page read.

2016-07-26 Thread Josef Bacik
On 07/04/2016 12:34 AM, Chandan Rajendra wrote: For the subpage-blocksize scenario, a page can contain multiple blocks. In such cases, this patch handles reading data from files. To track the status of individual blocks of a page, this patch makes use of a bitmap pointed to by the newly introduc

Re: [PATCH v3] btrfs: should block unused block groups deletion work when allocating data space

2016-07-26 Thread David Sterba
On Tue, Jul 26, 2016 at 11:51:39AM -0400, Josef Bacik wrote: > Also I > noticed we already have a delete_unused_bgs_mutex, can we drop that and > replace > it with bg_delete_sem as well? Thanks, Oh, yes please, making sense of all the mutexes and semaphores gets harder with every new one. -- T

Re: [PATCH v2] btrfs-progs: du: fix to skip not btrfs dir/file

2016-07-26 Thread David Sterba
On Sat, Jul 09, 2016 at 08:53:50AM +0300, Andrei Borzenkov wrote: > 07.07.2016 12:43, Wang Shilong пишет: > > 'btrfs file du' is a very useful tool to watch my system > > file usage information with snapshot aware. > > > > when trying to run following commands: > > [root@localhost btrfs-progs]# bt

Re: [PATCH v2] Btrfs: remove BUG() in raid56

2016-07-26 Thread David Sterba
On Wed, Jun 29, 2016 at 05:57:56PM -0700, Liu Bo wrote: > This BUG() has been triggered by a fuzz testing image, but in fact > btrfs can handle this gracefully by returning -EIO. > > Thus, use btrfs_warn to give us more debugging information than a > single BUG() and return error properly. > > S

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: Make RAID stripesize configurable

2016-07-26 Thread Chris Murphy
On Fri, Jul 22, 2016 at 8:58 AM, Austin S. Hemmelgarn wrote: > On 2016-07-22 09:42, Sanidhya Solanki wrote: >> +*stripesize=*;; >> +Specifies the new stripe size It'd be nice to stop conflating stripe size and stripe element size as if they're the same thing. I realize that LVM gets this wrong a

Re: [PATCH V20 02/19] Btrfs: subpage-blocksize: Fix whole page write

2016-07-26 Thread Josef Bacik
On 07/04/2016 12:34 AM, Chandan Rajendra wrote: For the subpage-blocksize scenario, a page can contain multiple blocks. In such cases, this patch handles writing data to files. Also, When setting EXTENT_DELALLOC, we no longer set EXTENT_UPTODATE bit on the extent_io_tree since uptodate status is

Re: [PATCH V20 03/19] Btrfs: subpage-blocksize: Make sure delalloc range intersects with the locked page's range

2016-07-26 Thread Josef Bacik
On 07/04/2016 12:34 AM, Chandan Rajendra wrote: find_delalloc_range indirectly depends on EXTENT_UPTODDATE to make sure that the delalloc range returned intersects with the file range mapped by the page. Since we now track "uptodate" state in a per-page bitmap (i.e. in btrfs_page_private->bstate)

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 t

Re: [PATCH V20 04/19] Btrfs: subpage-blocksize: Define extent_buffer_head

2016-07-26 Thread Josef Bacik
On 07/04/2016 12:34 AM, Chandan Rajendra wrote: In order to handle multiple extent buffers per page, first we need to create a way to handle all the extent buffers that are attached to a page. This patch creates a new data structure 'struct extent_buffer_head', and moves fields that are common t

Re: [PATCH] btrfs-progs: Make RAID stripesize configurable

2016-07-26 Thread Austin S. Hemmelgarn
On 2016-07-26 13:14, Chris Murphy wrote: On Fri, Jul 22, 2016 at 8:58 AM, Austin S. Hemmelgarn wrote: On 2016-07-22 09:42, Sanidhya Solanki wrote: +*stripesize=*;; +Specifies the new stripe size It'd be nice to stop conflating stripe size and stripe element size as if they're the same thin

Re: [PULL] Btrfs for 4.8, part 1

2016-07-26 Thread Chris Mason
On Tue, Jul 26, 2016 at 04:41:57PM +0200, David Sterba wrote: Hi, please pull the following patches to 4.8. There are mostly small independent fixes or cleanups. The branch is based on your current 'next' because of patch dependencies. I don't want to start it on 4.7-rc6 as the merge conflicts w

btrfs fi defrag -r -t 32M? What is actually happening?

2016-07-26 Thread Nicholas D Steeves
Hi, I've been using btrfs fi defrag with out the "-r -t 32M" option for regular maintenance. I just learned, in Documentation/btrfs-convert.asciidoc, that there is a recommendation to run with "-t 32M" after a conversion from ext2/3/4. I then cross-referenced this with btrfs-filesystem(8), and f

Re: btrfs fi defrag -r -t 32M? What is actually happening?

2016-07-26 Thread Duncan
Nicholas D Steeves posted on Tue, 26 Jul 2016 19:03:53 -0400 as excerpted: > Hi, > > I've been using btrfs fi defrag with out the "-r -t 32M" option for > regular maintenance. I just learned, in > Documentation/btrfs-convert.asciidoc, that there is a recommendation > to run with "-t 32M" after a

Re: [PATCH v3] btrfs: should block unused block groups deletion work when allocating data space

2016-07-26 Thread Wang Xiaoguang
hello, On 07/26/2016 11:51 PM, Josef Bacik wrote: On 07/26/2016 08:04 AM, Wang Xiaoguang wrote: cleaner_kthread() may run at any time, in which it'll call btrfs_delete_unused_bgs() to delete unused block groups. Because this work is asynchronous, it may also result in false ENOSPC error. Plea

perhaps a error in setup_root_args func

2016-07-26 Thread john gong
hi All, In func setup_root_args in fs/btrfs/super.c: while (1) { sep = strchrnul(args, ','); if (!strstarts(args, "subvol=") && !strstarts(args, "subvolid=")) { I think it should be: while (1) { sep = strchrnul(args, ','); if (!strstarts(args, "

Re: perhaps a error in setup_root_args func

2016-07-26 Thread john gong
Just skip up. I made a mistake. Sorry for that. On Wed, Jul 27, 2016 at 9:51 AM, john gong wrote: > hi All, > > In func setup_root_args in fs/btrfs/super.c: > while (1) { > sep = strchrnul(args, ','); > if (!strstarts(args, "subvol=") && > !strstarts(args, "subvoli

Re: [PATCH 0/3] Qgroup fixes for dirty hack routines

2016-07-26 Thread Qu Wenruo
Hi David, For your for-next-20160726 branch, I find that the old version of the 2nd patch is merged. Not the latest one in the patchset. Just in case, if you would like to merge the second patch(fix leaking qgroups numbers on data extents), please use the the first 2 patches of the patchset

Re: [PATCH v2] Btrfs: remove BUG() in raid56

2016-07-26 Thread Liu Bo
On Tue, Jul 26, 2016 at 06:58:42PM +0200, David Sterba wrote: > On Wed, Jun 29, 2016 at 05:57:56PM -0700, Liu Bo wrote: > > This BUG() has been triggered by a fuzz testing image, but in fact > > btrfs can handle this gracefully by returning -EIO. > > > > Thus, use btrfs_warn to give us more debugg

[PATCH v4] btrfs: should block unused block groups deletion work when allocating data space

2016-07-26 Thread Wang Xiaoguang
cleaner_kthread() may run at any time, in which it'll call btrfs_delete_unused_bgs() to delete unused block groups. Because this work is asynchronous, it may also result in false ENOSPC error. Please see below race window: CPU1 | CPU2

Re: [PATCH] btrfs-progs: Make RAID stripesize configurable

2016-07-26 Thread Sanidhya Solanki
On Tue, 26 Jul 2016 11:14:37 -0600 Chris Murphy wrote: > On Fri, Jul 22, 2016 at 8:58 AM, Austin S. Hemmelgarn > wrote: > > On 2016-07-22 09:42, Sanidhya Solanki wrote: > > >> +*stripesize=*;; > >> +Specifies the new stripe size > > It'd be nice to stop conflating stripe size and stripe el