[PATCH v5 2/2] generic: make 17[1-4] work well when btrfs compression is enabled

2016-11-01 Thread Wang Xiaoguang
When enabling btrfs compression, original codes can not fill fs correctly, here we introduce _fill_fs() in common/rc, which'll keep creating and writing files until enospc error occurs. Note _fill_fs is copied from tests/generic/256, but with some minor modifications. Signed-off-by: Wang

[PATCH v5 1/2] common/populate: use _require_xfs_io_command() in right place

2016-11-01 Thread Wang Xiaoguang
In original common/populate codes, we put _require_xfs_io_command "falloc" and _require_xfs_io_command "fpunch" in the begin of common/populate, but it's not appropriate, for fs, which does not support falloc and punch, will not be able to use other helper functions in common/populate, so here I

Re: [PATCH v2 4/4] xfstests: btrfs/134: add test for incremental send which renames a directory already being deleted

2016-11-01 Thread robbieko
Hi Eryu Guan, Yes, it need apply [PATCH] "Btrfs: incremental send, do not skip generation inconsistency check for inode 256." and test again, it will failed. because current code there is a problem, but just will not happen. Thansk Robbie Ko Eryu Guan 於 2016-11-01 15:20 寫到: On Fri, Oct 28,

Re: [PATCH v2 1/4] xfstests: btrfs/131: add test for an incremental send with name collision

2016-11-01 Thread robbieko
Hi Eryu Guan, OK, I will modify it. Thanks. Robbie Ko Eryu Guan 於 2016-11-01 15:17 寫到: On Fri, Oct 28, 2016 at 09:44:03AM +0800, robbieko wrote: From: Robbie Ko Test that an incremental send operation doesn't work because there's a name collision in the destination

[PATCH] btrfs: Call kunmap if zlib_inflateInit2 fails

2016-11-01 Thread Nick Terrell
If zlib_inflateInit2 fails, the input page is never unmapped. Add a call to kunmap when it fails. Signed-off-by: Nick Terrell --- fs/btrfs/zlib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/btrfs/zlib.c b/fs/btrfs/zlib.c index 88d274e..30e19c9 100644 ---

Re: [PATCH] generic: create and delete files repeatedly to exercise ENOSPC behaviour

2016-11-01 Thread Dave Chinner
On Tue, Nov 01, 2016 at 07:19:30PM +0800, Wang Xiaoguang wrote: > In btrfs, sometimes though the number of created files' consumed disk space > are not larger than fs's free space, we can still get some ENOSPC error, it > may be that btrfs does not try hard to reclaim disk space(I have sent kernel

Re: [PATCH v3 1/4] btrfs-progs: utils: Introduce function to escape characters

2016-11-01 Thread Qu Wenruo
At 11/01/2016 06:08 PM, David Sterba wrote: On Tue, Nov 01, 2016 at 04:01:43PM +0800, Qu Wenruo wrote: Introduce new function, escape_string_inplace(), to escape specified characters in place. Sorry, the pointer to seq_path was misleading. The actual escape function is mangle_path and it

Re: [PATCH v4] generic: make 17[1-4] work well when btrfs compression is enabled

2016-11-01 Thread Dave Chinner
On Tue, Nov 01, 2016 at 04:49:34PM +0800, Wang Xiaoguang wrote: > hi Darrick, > > Common/populate needs xfs_io supports falloc and fpunch, > so I didn't put _fill_fs() in common/populate. Tests will include common/rc first, and so pick up the functionality _fill_fs requires before it's included

Re: [PATCH 2/3] btrfs-progs: send: fix handling of multiple snapshots (-p option)

2016-11-01 Thread Tsutomu Itoh
Sorry for the late reply. On 2016/10/29 0:10, David Sterba wrote: > On Wed, Oct 19, 2016 at 11:35:03AM +0900, Tsutomu Itoh wrote: >> We cannot send multiple snapshots at once by -p option. > > We cannot like that it's broken, or we cannot because it's not supposed > to work that way. I guess

Re: [PATCH 2/3] btrfs-progs: Add a command to show bg info

2016-11-01 Thread divya . indi
On 10/28/2016 09:00 AM, David Sterba wrote: On Mon, Oct 17, 2016 at 05:35:14PM -0700, Divya Indi wrote: Add a new subcommand to btrfs inspect-internal btrfs inspect-internal bg_analysis Gives information about all the block groups. The sample output from the cover letter should also go

Re: [PATCH 1/3] btrfs-progs: Generic functions to retrieve chunks and their bg info

2016-11-01 Thread divya . indi
On 10/28/2016 08:44 AM, David Sterba wrote: On Mon, Oct 17, 2016 at 05:35:13PM -0700, Divya Indi wrote: An efficient alternative to retrieving block groups: get_chunks(): Walk the chunk tree to retrieve the chunks. get_bg_info(): For each retrieved chunk, lookup an exact match of block group

Re: [PATCH 3/3] btrfs-progs: Add command to check if balance op is req

2016-11-01 Thread divya . indi
On 10/31/2016 09:33 AM, David Sterba wrote: On Fri, Oct 28, 2016 at 05:29:45PM +0100, Graham Cobb wrote: On 28/10/16 16:20, David Sterba wrote: I tend to agree with this approach. The usecase, with some random sample balance options: $ btrfs balance start --analyze -dusage=10 -musage=5

Re: [PATCH v3 2/4] btrfs-progs: introduce new send-dump object

2016-11-01 Thread Qu Wenruo
At 11/01/2016 06:22 PM, David Sterba wrote: On Tue, Nov 01, 2016 at 04:01:44PM +0800, Qu Wenruo wrote: +/* + * Underlying PRINT_DUMP, the only difference is how we handle + * the full path. + */ +static int __print_dump(int subvol, void *user, const char *path, + const

Re: Snapper & apt-btrfs-snapshot on Ubuntu

2016-11-01 Thread Hans van Kranenburg
On 11/02/2016 01:00 AM, Ahmed Badr wrote: > > Btrfs newbie here Congrats! > trying to figure out how to use it properly on Ubuntu > 16.04 server. > > I have root formated using Btrfs, and installed Snapper and everything > seems to works fine. I installed apt-btrfs-snapshot which takes

Snapper & apt-btrfs-snapshot on Ubuntu

2016-11-01 Thread Ahmed Badr
Hi all, Btrfs newbie here trying to figure out how to use it properly on Ubuntu 16.04 server. I have root formated using Btrfs, and installed Snapper and everything seems to works fine. I installed apt-btrfs-snapshot which takes snapshot before and after apt-get just like OpenSUSE/Zypper and

Re: [PULL] Btrfs fixes for 4.9-rc4

2016-11-01 Thread Chris Mason
On Tue, Nov 01, 2016 at 02:02:25PM +0100, David Sterba wrote: Hi, please pull the following assorted small fixes to 4.9, thanks. The branch is "rc3" as it was meant for rc3 but I did not get to sending the pull request, and I don't want to recreate the branch just because of a slightly wrong

Re: cannot mount read-write because of unsupported optional features (2)

2016-11-01 Thread Omar Sandoval
On Tue, Nov 01, 2016 at 04:03:38PM +0100, Tobias Holst wrote: > Ah thanks! Looks like I missed this bug on the list... > > But as I understand it, it should be mountable with btrfs-progs > >=4.7.3 or when mounting it with "-o clear_cache,nospace_cache". But > both doesn't work. Is it only

Re: cannot mount read-write because of unsupported optional features (2)

2016-11-01 Thread Tobias Holst
Ah thanks! Looks like I missed this bug on the list... But as I understand it, it should be mountable with btrfs-progs >=4.7.3 or when mounting it with "-o clear_cache,nospace_cache". But both doesn't work. Is it only mountable with kernel >=4.9 anymore? That would be interesting since I never

dmesg traces from enospc_debug & kernel 4.9-r3

2016-11-01 Thread E V
Testing 4.9-rc3 on my big backup system running rsync. Saw 10 traces over the last day, I broke them down into groups for were they differ with a full trace at the bottom for reference. Hopefully useful to somebody. Everything is running fine so far. Can send all the full traces if someone is

[PATCH] btrfs: store and load values of stripes_min/stripes_max in balance status item

2016-11-01 Thread David Sterba
The balance status item contains currently known filter values, but the stripes filter was unintentionally not among them. This would mean, that interrupted and automatically restarted balance does not apply the stripe filters. Fixes: dee32d0ac3719ef8d640efaf0884111df444730f CC:

[PULL] Btrfs fixes for 4.9-rc4

2016-11-01 Thread David Sterba
Hi, please pull the following assorted small fixes to 4.9, thanks. The branch is "rc3" as it was meant for rc3 but I did not get to sending the pull request, and I don't want to recreate the branch just because of a slightly wrong name.

Re: [PATCH] generic: create and delete files repeatedly to exercise ENOSPC behaviour

2016-11-01 Thread Eryu Guan
On Tue, Nov 01, 2016 at 07:19:30PM +0800, Wang Xiaoguang wrote: > In btrfs, sometimes though the number of created files' consumed disk space > are not larger than fs's free space, we can still get some ENOSPC error, it > may be that btrfs does not try hard to reclaim disk space(I have sent kernel

Re: [PATCH v2 2/3] btrfs-progs: receive: Introduce option to exam and dump send stream

2016-11-01 Thread David Sterba
On Tue, Nov 01, 2016 at 09:10:09AM +0800, Qu Wenruo wrote: > I'm just a little curious about the stream samples. > Should I create a send-dump-test to include all these samples? Or put > them somewhere else? Misc tests would be fine for now, as you did in the new patchset. -- To unsubscribe from

[PATCH] generic: create and delete files repeatedly to exercise ENOSPC behaviour

2016-11-01 Thread Wang Xiaoguang
In btrfs, sometimes though the number of created files' consumed disk space are not larger than fs's free space, we can still get some ENOSPC error, it may be that btrfs does not try hard to reclaim disk space(I have sent kernel patch to resolve this kind of enospc error. Note, this false enospc

Re: [PATCH 2/2] btrfs: fix false enospc for compression

2016-11-01 Thread Wang Xiaoguang
hi, I have rebased these 2 patches against Linux 4.9-rc2, sorry for being late. After applying these patches, Stefan does not see any ENOSPC error :) If you have free time, please have a check, thanks. Regards, Xiaoguang Wang On 11/01/2016 06:18 PM, Wang Xiaoguang wrote: When testing btrfs

[PATCH] btrfs: Remove some dead code

2016-11-01 Thread Christophe JAILLET
'btrfs_iget()' can not return an error pointer, so this test can be removed. Signed-off-by: Christophe JAILLET --- fs/btrfs/free-space-cache.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index

[PATCH 2/2] btrfs: fix false enospc for compression

2016-11-01 Thread Wang Xiaoguang
When testing btrfs compression, sometimes we got ENOSPC error, though fs still has much free space, xfstests generic/171, generic/172, generic/173, generic/174, generic/175 can reveal this bug in my test environment when compression is enabled. After some debuging work, we found that it's

[PATCH 1/2] btrfs: improve inode's outstanding_extents computation

2016-11-01 Thread Wang Xiaoguang
This issue was revealed by modifying BTRFS_MAX_EXTENT_SIZE(128MB) to 64KB, When modifying BTRFS_MAX_EXTENT_SIZE(128MB) to 64KB, fsstress test often gets these warnings from btrfs_destroy_inode(): WARN_ON(BTRFS_I(inode)->outstanding_extents);

Re: [PATCH v3 2/4] btrfs-progs: introduce new send-dump object

2016-11-01 Thread David Sterba
On Tue, Nov 01, 2016 at 04:01:44PM +0800, Qu Wenruo wrote: > +/* > + * Underlying PRINT_DUMP, the only difference is how we handle > + * the full path. > + */ > +static int __print_dump(int subvol, void *user, const char *path, > + const char *title, const char *fmt, ...)

Re: [PATCH v3 1/4] btrfs-progs: utils: Introduce function to escape characters

2016-11-01 Thread David Sterba
On Tue, Nov 01, 2016 at 04:01:43PM +0800, Qu Wenruo wrote: > Introduce new function, escape_string_inplace(), to escape specified > characters in place. Sorry, the pointer to seq_path was misleading. The actual escape function is mangle_path and it copies one string to another. As we just print

Re: [PATCH v4] generic: make 17[1-4] work well when btrfs compression is enabled

2016-11-01 Thread Wang Xiaoguang
hi Darrick, Common/populate needs xfs_io supports falloc and fpunch, so I didn't put _fill_fs() in common/populate. Regards, Xiaoguang Wang On 11/01/2016 04:45 PM, Wang Xiaoguang wrote: When enabling btrfs compression, original codes can not fill fs correctly, here we introduce _fill_fs() in

[PATCH v4] generic: make 17[1-4] work well when btrfs compression is enabled

2016-11-01 Thread Wang Xiaoguang
When enabling btrfs compression, original codes can not fill fs correctly, here we introduce _fill_fs() in common/rc, which'll keep creating and writing files until enospc error occurs. Note _fill_fs is copied from tests/generic/256, but with some minor modifications. Signed-off-by: Wang

[PATCH v3 2/4] btrfs-progs: introduce new send-dump object

2016-11-01 Thread Qu Wenruo
Introduce send-dump.[ch] which implements a new btrfs_send_ops to exam and output all operations inside a send stream. It has a better output format than the old and no longer compilable send-test tool, but still tries to be script friendly. Provides the basis for later "inspect-internal

[PATCH v3 1/4] btrfs-progs: utils: Introduce function to escape characters

2016-11-01 Thread Qu Wenruo
Introduce new function, escape_string_inplace(), to escape specified characters in place. Signed-off-by: Qu Wenruo --- utils.c | 17 + utils.h | 2 ++ 2 files changed, 19 insertions(+) diff --git a/utils.c b/utils.c index 3f54245..69faae1 100644 ---

[PATCH v3 4/4] btrfs-progs: remove send-test tool

2016-11-01 Thread Qu Wenruo
Since new "receive --dump" has better output and structure, it's time to remove old and function-weak send-test tool. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba --- Makefile.in | 6 +- send-test.c | 447

[PATCH 5/5] btrfs-progs: misc-test: Add send stream dump test

2016-11-01 Thread Qu Wenruo
* PLEASE DON'T MERGE THIS PATCH* With 2 send stream which contains all operations for user to check the output. This is just used for checking output format and find any possible deflects or ugly layout. It doesn't really checks any thing and doesn't follow normal test output redirection.

[PATCH v3 0/4] Introduce dump option for btrfs-receive

2016-11-01 Thread Qu Wenruo
The branch can be fetched from github: https://github.com/adam900710/btrfs-progs/tree/send_dump The branch doesn't contain the fake test case. Introduce new "--dump" option for btrfs-receive, which will exam and dump metadata info of a send stream. This is quite handy to debug send stream.

[PATCH v3 3/4] btrfs-progs: receive: introduce option to dump send stream

2016-11-01 Thread Qu Wenruo
Introduce new option, '--dump' for receive subcommand. With this command, user can dump the metadata of a send stream. Which is quite useful for education purpose or bug reporting. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba ---

Re: [PATCH v2 4/4] xfstests: btrfs/134: add test for incremental send which renames a directory already being deleted

2016-11-01 Thread Eryu Guan
On Fri, Oct 28, 2016 at 09:44:06AM +0800, robbieko wrote: > From: Robbie Ko > > Test that an incremental send operation dosen't work because > it tries to rename a directory which is already deleted. > > This test exercises scenarios used to fail in btrfs and are fixed by

Re: [PATCH v2 1/4] xfstests: btrfs/131: add test for an incremental send with name collision

2016-11-01 Thread Eryu Guan
On Fri, Oct 28, 2016 at 09:44:03AM +0800, robbieko wrote: > From: Robbie Ko > > Test that an incremental send operation doesn't work because > there's a name collision in the destination and it's not checked > corretly before the rename operation applies. > > This test