[PATCH V2] Btrfs-progs: Initialize stripesize to the value of sectorsize

2016-06-16 Thread Chandan Rajendra
stripesize should ideally be set to the value of sectorsize. However previous versions of btrfs-progs/mkfs.btrfs had set stripesize to a value of 4096. On machines with PAGE_SIZE other than 4096, This could lead to the following scenario, - /dev/loop0, /dev/loop1 and /dev/loop2 are mounted as a

Re: [PATCH] Btrfs: let super_stripesize match with sectorsize

2016-06-16 Thread Chandan Rajendra
On Thursday, June 16, 2016 10:01:41 AM Liu Bo wrote: > On Thu, Jun 16, 2016 at 01:53:59PM +0530, Chandan Rajendra wrote: > > On Wednesday, June 15, 2016 05:09:55 PM Liu Bo wrote: > > > On Wed, Jun 15, 2016 at 03:50:17PM +0530, Chandan Rajendra wrote: > > > > On Wednesday, June 15, 2016 09:12:28 AM

[PATCH 19/20] xfs: run xfs_repair at the end of each test

2016-06-16 Thread Darrick J. Wong
Run xfs_repair twice at the end of each test -- once to rebuild the btree indices, and again with -n to check the rebuild work. Signed-off-by: Darrick J. Wong --- common/rc |3 +++ 1 file changed, 3 insertions(+) diff --git a/common/rc b/common/rc index

[PATCH 20/20] xfs: scrub fs (if still mounted) at the end of the test

2016-06-16 Thread Darrick J. Wong
Teach _check_xfs_filesystem to scrub mounted filesystems before unmounting and fscking them. This is mostly to test the online scrub tool... Signed-off-by: Darrick J. Wong --- common/config |1 + common/rc |7 +++ 2 files changed, 8 insertions(+) diff

[PATCH 13/20] xfs/229: require 3GB of space

2016-06-16 Thread Darrick J. Wong
This test requires 3GB of space, so check for that. Signed-off-by: Darrick J. Wong --- tests/xfs/229 |1 + 1 file changed, 1 insertion(+) diff --git a/tests/xfs/229 b/tests/xfs/229 index c057677..b8fd914 100755 --- a/tests/xfs/229 +++ b/tests/xfs/229 @@ -50,6

[PATCH 18/20] xfs/128: use $XFS_FSR_PROG instead of xfs_fsr directly

2016-06-16 Thread Darrick J. Wong
Signed-off-by: Darrick J. Wong --- tests/xfs/128 |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/xfs/128 b/tests/xfs/128 index 68f6f94..8758d7e 100755 --- a/tests/xfs/128 +++ b/tests/xfs/128 @@ -97,10 +97,10 @@ c14=$(_md5_checksum

[PATCH 14/20] xfs: test clearing reflink inode flag

2016-06-16 Thread Darrick J. Wong
Check that xfs_repair can clear the reflink inode flag. Signed-off-by: Darrick J. Wong --- tests/xfs/872 | 93 + tests/xfs/872.out | 20 +++ tests/xfs/group |1 + 3 files changed, 114

[PATCH 10/20] xfs/122: list the new log redo items

2016-06-16 Thread Darrick J. Wong
List the new log redo items. These should have stable sizes. Signed-off-by: Darrick J. Wong --- tests/xfs/122.out |8 1 file changed, 8 insertions(+) diff --git a/tests/xfs/122.out b/tests/xfs/122.out index ebc4421..c4ed725 100644 --- a/tests/xfs/122.out

[PATCH 17/20] generic/204: increase log size for rmap/reflink

2016-06-16 Thread Darrick J. Wong
We're going to need a bigger log for rmap & reflink on XFS, so increase the size of the log and the fs appropriately. Signed-off-by: Darrick J. Wong --- tests/generic/204 |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/generic/204

[PATCH 08/20] xfs/122: don't break on old xfsprogs

2016-06-16 Thread Darrick J. Wong
If we're running against a old version of xfsprogs that lacks some of the structures that the golden output knows about, copy the structure size definition from the golden output to the program output. This way we can check for structure size mutations on old xfsprogs without generating false

[PATCH 12/20] xfs/235: fix logic errors when checking rmap usage after failures

2016-06-16 Thread Darrick J. Wong
Signed-off-by: Darrick J. Wong --- tests/xfs/235 |4 ++-- tests/xfs/235.out |1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/xfs/235 b/tests/xfs/235 index c388af1..c2e0340 100755 --- a/tests/xfs/235 +++ b/tests/xfs/235 @@ -80,8

[PATCH 11/20] xfs: inject errors at various parts of the deferred op completion

2016-06-16 Thread Darrick J. Wong
Signed-off-by: Darrick J. Wong --- common/inject | 93 + common/log| 28 ++ common/rc |8 tests/xfs/857 | 102 ++

[PATCH 07/20] reflink: test changing sharers of a block while keeping refcount the same

2016-06-16 Thread Darrick J. Wong
Ensure that we can handle the case where the refcount stays the same even though the actual sharers changes. Signed-off-by: Darrick J. Wong --- tests/generic/925 | 80 ++ tests/generic/925.out | 69

[PATCH 09/20] xfs/122: fix test output to reflect latest xfsprogs

2016-06-16 Thread Darrick J. Wong
Since we're getting rid of the rmapxbt, don't test for it. Add back the log inode structure. Signed-off-by: Darrick J. Wong --- tests/xfs/122.out |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/xfs/122.out b/tests/xfs/122.out index

[PATCH 16/20] reflink: test cross-mountpoint reflink and dedupe

2016-06-16 Thread Darrick J. Wong
Test sharing blocks via reflink and dedupe between two different mountpoints of the same filesystem. This shouldn't work, since we don't allow cross-mountpoint functions. Signed-off-by: Darrick J. Wong --- common/reflink|2 + tests/generic/927 | 88

[PATCH 15/20] xfstests: fix unreferenced variables in generic/186 and generic/187

2016-06-16 Thread Darrick J. Wong
From: Christoph Hellwig There is not i variable in scope, and the comments suggest the operation is to be done on ${file}. Signed-off-by: Christoph Hellwig --- tests/generic/186 |2 +- tests/generic/187 |2 +- 2 files changed, 2 insertions(+), 2 deletions(-)

[PATCH 04/20] xfs: test per-ag allocation accounting during truncate-caused refcountbt expansion

2016-06-16 Thread Darrick J. Wong
Ensure that refcountbt allocations during truncate operations come from the per-AG reservation and are not charged to the transaction. Reported-by: Christoph Hellwig Signed-off-by: Darrick J. Wong --- tests/xfs/855 | 95

[PATCH 05/20] reflink: test interaction with swap files

2016-06-16 Thread Darrick J. Wong
Since none of the current filesystems support reflinked swap files, make sure that we prohibit reflinking of swapfiles and swapon of reflinked files. Signed-off-by: Darrick J. Wong Cc: Christoph Hellwig --- tests/generic/923 | 74

[PATCH 02/20] tests: don't put loop control files on the scratch mount

2016-06-16 Thread Darrick J. Wong
If we're doing write/overwrite/snapshot/resource exhaustion tests on the scratch device, use the test directory to hold the loop termination signal files. This way we don't run infinitely because we can't create the flag due to ENOSPC. v2: put the control files in /tmp, not $TEST_DIR

[PATCH 06/20] xfs: test rmap behavior when multiple bmbt records map to a single rmapbt record

2016-06-16 Thread Darrick J. Wong
Make sure that we can handle multiple bmbt records mapping to a single rmapbt record. This can happen if you fallocate more than 2^21 contiguous blocks to a file. (Also add some helpers that can create huge devices with some dm-zero and dm-snapshot fakery.) v2: remove irrelevant t_immutable

[PATCH 03/20] xfs: test copy-on-write leftover recovery

2016-06-16 Thread Darrick J. Wong
Test recovery of CoW leftovers in xfs_repair. Signed-off-by: Darrick J. Wong --- tests/xfs/853 | 179 + tests/xfs/853.out | 13 tests/xfs/854 | 180 +

[PATCH 01/20] xfs/104: don't enospc when ag metadata overhead grows

2016-06-16 Thread Darrick J. Wong
Adapt to different metadata overhead sizes by trying to reserve decreasing amounts of disk space until we actually succeed at it. Signed-off-by: Darrick J. Wong --- tests/xfs/104 |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git

[PATCH v6 00/20] xfstests: minor fixes for the reflink/dedupe tests

2016-06-16 Thread Darrick J. Wong
Hi all, This is the sixth revision of a patchset that adds to xfstests support for testing reverse-mappings of physical blocks to file and metadata (rmap); support for testing multiple file logical blocks to the same physical block (reflink); and implements the beginnings of online metadata

[PATCH v8.1 1/4] btrfs-progs: Basic framework for dedupe-inband command group

2016-06-16 Thread Qu Wenruo
Add basic ioctl header and command group framework for later use. Alone with basic man page doc. Signed-off-by: Qu Wenruo --- Add missing dedupe-in.h --- Documentation/Makefile.in | 1 + Documentation/btrfs-dedupe-inband.asciidoc | 40

Re: BTRFS, remarkable problem: filesystem turns to read-only caused by firefox download

2016-06-16 Thread Qu Wenruo
At 06/17/2016 01:22 AM, Paul Verreth wrote: Hello. New test: I booted from a live USB-stick with all updates installed (4.4.0-21-generic), and after mount of the btrfs filesystem, the balance continued, and a bug appeared in kern.log. The filesystem turned readonly An important directory

[PATCH v8 2/4] btrfs-progs: dedupe: Add enable command for dedupe command group

2016-06-16 Thread Qu Wenruo
Add enable subcommand for dedupe commmand group. Signed-off-by: Qu Wenruo --- Documentation/btrfs-dedupe-inband.asciidoc | 106 - btrfs-completion | 6 +- cmds-dedupe-ib.c | 148

[PATCH v8 0/4] Inband dedupe for btrfs-progs

2016-06-16 Thread Qu Wenruo
Patchset can be fetched from github: https://github.com/adam900710/btrfs-progs.git dedupe_20160606 Inband dedupe(in-memory backend only) ioctl support for btrfs-progs. User/reviewer/tester can still use previous btrfs-progs patchset to test, this update is just cleanuping unsupported functions,

[PATCH v8 4/4] btrfs-progs: dedupe: Add status subcommand

2016-06-16 Thread Qu Wenruo
Add status subcommand for dedupe command group. Signed-off-by: Qu Wenruo --- Documentation/btrfs-dedupe-inband.asciidoc | 3 ++ btrfs-completion | 2 +- cmds-dedupe-ib.c | 81 ++ 3 files

[PATCH v8 1/4] btrfs-progs: Basic framework for dedupe-inband command group

2016-06-16 Thread Qu Wenruo
Add basic ioctl header and command group framework for later use. Alone with basic man page doc. Signed-off-by: Qu Wenruo --- Documentation/Makefile.in | 1 + Documentation/btrfs-dedupe-inband.asciidoc | 40 +

[PATCH v8 3/4] btrfs-progs: dedupe: Add disable support for inband dedupelication

2016-06-16 Thread Qu Wenruo
Add disable subcommand for dedupe command group. Signed-off-by: Qu Wenruo --- Documentation/btrfs-dedupe-inband.asciidoc | 5 btrfs-completion | 2 +- cmds-dedupe-ib.c | 42 ++ 3

Re: [PATCH] Btrfs-progs: Initialize stripesize to the value of sectorsize

2016-06-16 Thread Satoru Takeuchi
On 2016/06/17 1:38, Chandan Rajendra wrote: > stripesize should ideally be set to the value of sectorsize. However > previous versions of btrfs-progs/mkfs.btrfs had set stripesize to a > value of 4096. On machines with PAGE_SIZE other than 4096, This could > lead to the following scenario, > > -

Re: BTRFS, remarkable problem: filesystem turns to read-only caused by firefox download

2016-06-16 Thread Chris Murphy
On Wed, Jun 15, 2016 at 12:29 AM, Paul Verreth wrote: > Dear all. > > When I download a video using Firefox DownloadHelper addon, the > filesystem suddenly turns read only. Not a coincedence, I tried it > several times, and it happened every time again > > Info: > Linux wolfgang

Re: Replacing drives with larger ones in a 4 drive raid1

2016-06-16 Thread boli
> a "replace" of the 3rd 6 TB drive onto a second 8 TB drive is currently in > progress (at high speed). This second replace is now finished, and it looks OK now: # btrfs replace status /data Started on 16.Jun 01:15:17, finished on 16.Jun 11:40:30, 0 write errs, 0 uncorr. read

Re: BTRFS, remarkable problem: filesystem turns to read-only caused by firefox download

2016-06-16 Thread Paul Verreth
Hello. After rescue: root@ubuntu:/mnt# btrfs rescue chunk-recover -v /dev/sda5 All Devices: Device: id = 2, name = /dev/sdb5 Device: id = 1, name = /dev/sda5 Scanning: 184371421184 in dev0, 184315789312 in dev1chunk-recover.c:129: process_extent_buffer: Assertion `exist->nmirrors >=

Re: BTRFS, remarkable problem: filesystem turns to read-only caused by firefox download

2016-06-16 Thread Paul Verreth
Hello. New test: I booted from a live USB-stick with all updates installed (4.4.0-21-generic), and after mount of the btrfs filesystem, the balance continued, and a bug appeared in kern.log. The filesystem turned readonly An important directory was missing. Jun 16 17:38:08 ubuntu kernel: [

Re: Balance fails with unallocated diskspace

2016-06-16 Thread Nisse Karlsson
After some more balance passes with different values of -dusage and removal of some files (around 50GB) I finally managed to convert the volume back to raid1. So my problem is solved, but it still seems like bug to me. //Nisse 2016-06-15 18:29 GMT+02:00 Chris Murphy : >

Re: [PATCH] Btrfs: let super_stripesize match with sectorsize

2016-06-16 Thread Liu Bo
On Thu, Jun 16, 2016 at 01:53:59PM +0530, Chandan Rajendra wrote: > On Wednesday, June 15, 2016 05:09:55 PM Liu Bo wrote: > > On Wed, Jun 15, 2016 at 03:50:17PM +0530, Chandan Rajendra wrote: > > > On Wednesday, June 15, 2016 09:12:28 AM Chandan Rajendra wrote: > > > > Hello Liu Bo, > > > > > > >

[PATCH] Btrfs-progs: Initialize stripesize to the value of sectorsize

2016-06-16 Thread Chandan Rajendra
stripesize should ideally be set to the value of sectorsize. However previous versions of btrfs-progs/mkfs.btrfs had set stripesize to a value of 4096. On machines with PAGE_SIZE other than 4096, This could lead to the following scenario, - /dev/loop0, /dev/loop1 and /dev/loop2 are mounted as a

[PATCH] Btrfs: btrfs_check_super_valid: Allow 4096 as stripesize

2016-06-16 Thread Chandan Rajendra
Older btrfs-progs/mkfs.btrfs sets 4096 as the stripesize. Hence restricting stripesize to be equal to sectorsize would cause super block validation to return an error on architectures where PAGE_SIZE is not equal to 4096. Hence as a workaround, this commit allows stripesize to be set to 4096

Re: [PATCH] Btrfs: let super_stripesize match with sectorsize

2016-06-16 Thread Chandan Rajendra
On Wednesday, June 15, 2016 05:09:55 PM Liu Bo wrote: > On Wed, Jun 15, 2016 at 03:50:17PM +0530, Chandan Rajendra wrote: > > On Wednesday, June 15, 2016 09:12:28 AM Chandan Rajendra wrote: > > > Hello Liu Bo, > > > > > > We have to fix the following check in check_super() as well, > > > > > >