[PATCH 0/1] btrfs: remove an unsed varialbe first_index

2015-09-20 Thread Shan Hai
This patch removes an unused variable from file.c for code clearance purpose. Thanks Shan Hai -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 1/1] btrfs/file.c: remove an unsed varialbe first_index

2015-09-20 Thread Shan Hai
From: Shan Hai The commit b37392ea86761 ("Btrfs: cleanup unnecessary parameter and variant of prepare_pages()") makes it redundant. Signed-off-by: Shan Hai --- fs/btrfs/file.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index b823fac..b6695c4 100644

[PATCH 0/5] Btrfs: Per-chunk degradable check

2015-09-20 Thread Qu Wenruo
Btrfs currently uses num_tolerated_disk_barrier_failures to do global check for tolerated missing device. Although the one-size-fit-all solution is quite safe, it's too strict if data and metadata has different duplication level. For example, if one use Single data and RAID1 metadata for 2 disks,

[PATCH 5/5] btrfs: Cleanup num_tolerated_disk_barrier_failures

2015-09-20 Thread Qu Wenruo
As we use per-chunk degradable check, now the global num_tolerated_disk_barrier_failures is of no use. So cleanup it. Signed-off-by: Qu Wenruo --- fs/btrfs/ctree.h | 2 -- fs/btrfs/disk-io.c | 56 -- fs/btrfs/disk-io.h | 2 -- fs/btrfs/vol

[PATCH 1/5] btrfs: Introduce a new function to check if all chunks a OK for degraded mount

2015-09-20 Thread Qu Wenruo
Introduce a new function, btrfs_check_degradable(), to judge if all chunks in btrfs is OK for degraded mount. It provides the new basis for accurate btrfs mount/remount and even runtime degraded mount check other than old one-size-fit-all method. Signed-off-by: Qu Wenruo --- fs/btrfs/volumes.c

[PATCH 2/5] btrfs: Do per-chunk check for mount time check

2015-09-20 Thread Qu Wenruo
Now use the btrfs_check_degraded() to do mount time degraded check. With this patch, now we can mount with the following case: # mkfs.btrfs -f -m raid1 -d single /dev/sdb /dev/sdc # wipefs -a /dev/sdc # mount /dev/sdb /mnt/btrfs -o degraded As the single data chunk is only in sdb, so it's OK t

[PATCH 3/5] btrfs: Do per-chunk degraded check for remount

2015-09-20 Thread Qu Wenruo
Just the same for mount time check, use new btrfs_check_degraded() to do per chunk check. Signed-off-by: Qu Wenruo --- fs/btrfs/super.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index c389c13..720c044 100644 --- a/fs/btrfs

[PATCH 4/5] btrfs: Allow barrier_all_devices to do per-chunk device check

2015-09-20 Thread Qu Wenruo
The last user of num_tolerated_disk_barrier_failures is barrier_all_devices(). But it's can be easily changed to new per-chunk degradable check framework. Now btrfs_device will have two extra members, representing send/wait error, set at write_dev_flush() time. And then check it in a similar but m

Re: [PATCH 2/2] btrfs: Remove unneeded missing device number check

2015-09-20 Thread Qu Wenruo
Anand Jain wrote on 2015/09/20 13:37 +0800: On 09/20/2015 08:31 AM, Qu Wenruo wrote: 在 2015年09月18日 14:45, Anand Jain 写道: Hi Qu, Thanks for the comments on patch [1]. For example, if one use single metadata for 2 disks, > and each disk has one metadata chunk on it. how that can

Re: [PATCH v6] fstests: btrfs: Add reserved space leak check for rewrite dirty page

2015-09-20 Thread Dave Chinner
On Wed, Aug 26, 2015 at 03:30:57PM +0800, Qu Wenruo wrote: > +# Use big blocksize to ensure there is still enough space left for metadata > +# space reserve. > +BLOCKSIZE=$(( 2 * 1024 * 1024 )) # 2M block size > +FILESIZE=$(( 128 * 1024 * 1024 )) # 128M file size Little thing in terms of style her

Btrfs progs release 4.2.1

2015-09-20 Thread David Sterba
Hi, here's a bugfix release of btrfs-progs. * fix an off-by-one error in cross-stripe boundary check * if nodesize was 64k, any metadata block was reported as crossing, this leads to mkfs failure for example due to "no free blocks found" * for other nodesizes, if the end of the metadata b

Re: [PATCH RESEND] btrfs-progs: tests: Add '-o loop' to mount command line in convert-tests.sh

2015-09-20 Thread David Sterba
On Tue, Sep 15, 2015 at 05:22:17PM +0800, Zhao Lei wrote: > To fix following bug: > # ./convert-tests.sh > [TEST] ext2 4k nodesize, btrfs defaults > failed: mount /root/btrfsprogs/tests/test.img /root/btrfsprogs/tests/mnt > # tail convert-tests-results.txt > ... > ### mount

Re: kernel BUG at linux-4.2.0/fs/btrfs/extent-tree.c:1833 on rebalance

2015-09-20 Thread Stéphane Lesimple
Le 2015-09-20 12:51, Qu Wenruo a écrit : Would you please use gdb to show the codes of "btrfs_qgroup_rescan_worker+0x388" ? (Need kernel debuginfo) My guess is the following line:(pretty sure, but not 100% sure) -- /* * only update status, since the previous part has alreay updated

Re: kernel BUG at linux-4.2.0/fs/btrfs/extent-tree.c:1833 on rebalance

2015-09-20 Thread Qu Wenruo
在 2015年09月20日 18:35, Stéphane Lesimple 写道: Le 2015-09-20 03:22, Qu Wenruo a écrit : The mentioned steps are as follows : 0) Rsync data from the next ext4 "snapshot" to the subvolume 1) Do 'sync; btrfs qgroup show -⁠prce -⁠-⁠raw' and save the output <== 2) Create the needed readonly snapshot o

Re: kernel BUG at linux-4.2.0/fs/btrfs/extent-tree.c:1833 on rebalance

2015-09-20 Thread Stéphane Lesimple
Le 2015-09-20 03:22, Qu Wenruo a écrit : The mentioned steps are as follows : 0) Rsync data from the next ext4 "snapshot" to the subvolume 1) Do 'sync; btrfs qgroup show -⁠prce -⁠-⁠raw' and save the output <== 2) Create the needed readonly snapshot on btrfs 3) Do 'sync; btrfs qgroup show -⁠prc

Re: [PATCH] Btrfs: Check metadata redundancy on balance

2015-09-20 Thread sam tygier
On 16/09/15 11:15, Zhao Lei wrote: > Hi, sam tygier > >> -Original Message- >> From: linux-btrfs-ow...@vger.kernel.org >> [mailto:linux-btrfs-ow...@vger.kernel.org] On Behalf Of sam tygier >> Sent: Wednesday, September 16, 2015 4:42 PM >> To: linux-btrfs@vger.kernel.org >> Subject: [PATCH]