Re: I'd like a -r flag on btrfs subvolume delete

2015-07-16 Thread Paul Harvey
On 16 July 2015 at 13:44, Chris Murphy li...@colorremedies.com wrote: The choice of improper wasn't ideal on my part. There's nothing directly wrong with nested subvolumes. But if you then combine them with snapshots and rollbacks, there are consequences that include more complication. If more

Re: [PATCH] fstests: generic test for fsync after adding hard links

2015-07-16 Thread Eryu Guan
On Wed, Jul 15, 2015 at 11:59:27PM +0100, fdman...@kernel.org wrote: From: Filipe Manana fdman...@suse.com Test that if we add hard links (in the same directory) to two files and then fsync only one of the files, after the fsync log/journal is replayed all the links exist and the filesystem

Re: [PATCH] btrfs: Fix lockdep warning of btrfs_run_delayed_iputs()

2015-07-16 Thread Liu Bo
On Wed, Jul 15, 2015 at 11:48:14AM +0800, Zhaolei wrote: From: Zhao Lei zhao...@cn.fujitsu.com Liu Bo bo.li@oracle.com reported a lockdep warning of delayed_iput_sem in xfstests generic/241: [ 2061.345955] = [ 2061.346027] [ INFO: possible

[PATCH] Btrfs: fix stale directory entries after fsync log replay

2015-07-16 Thread fdmanana
From: Filipe Manana fdman...@suse.com We have another case where after an fsync log replay we get an inode with a wrong link count (smaller than it should be) and a number of directory entries greater than its link count. This happens when we add a new link hard link to our inode A and then we

[PATCH] fstests: generic test for fsync after adding hard links

2015-07-16 Thread fdmanana
From: Filipe Manana fdman...@suse.com Test that if we add hard links (in the same directory) to two files and then fsync only one of the files, after the fsync log/journal is replayed all the links exist and the filesystem metadata (directory and file inodes) is in a consistent state. This test

Re: I'd like a -r flag on btrfs subvolume delete

2015-07-16 Thread Hugo Mills
On Thu, Jul 16, 2015 at 01:12:03PM +1000, Paul Harvey wrote: On 16 July 2015 at 11:35, Chris Murphy li...@colorremedies.com wrote: On Wed, Jul 15, 2015 at 6:11 PM, Johannes Ernst johannes.er...@gmail.com wrote: Cleaning this all up is a bit of pain, and btrfs subvolume delete -r

[PATCH] btrfs: Show detail information when mount failed on missing devices

2015-07-16 Thread Zhaolei
From: Zhao Lei zhao...@cn.fujitsu.com When mount failed because missing device, we can see following dmesg: [ 1060.267743] BTRFS: too many missing devices, writeable mount is not allowed [ 1060.273158] BTRFS: open_ctree failed This patch add missing_device_number and

[PATCH] btrfs: Cleanup for btrfs_calc_num_tolerated_disk_barrier_failures()

2015-07-16 Thread Zhaolei
From: Zhao Lei zhao...@cn.fujitsu.com 1: Use ARRAY_SIZE(types) to replace a static-value variant: int num_types = 4; 2: Use 'continue' on condition to reduce one level tab if (!XXX) { code; ... } - if (XXX) continue; code; ... 3: Put setting

Re: BTRFS raid6 unmountable after a couple of days of usage.

2015-07-16 Thread Austin S Hemmelgarn
On 2015-07-15 17:29, Chris Murphy wrote: On Wed, Jul 15, 2015 at 10:15 AM, Hugo Mills h...@carfax.org.uk wrote: There is at least one superblock on every device, usually two, and often three. Each superblock contains the virtual address of the roots of the root tree, the chunk tree and the

[PATCH] btrfs: Add raid56 support for updating num_tolerated_disk_barrier_failures in btrfs_balance()

2015-07-16 Thread Zhaolei
From: Zhao Lei zhao...@cn.fujitsu.com Code for updating fs_info-num_tolerated_disk_barrier_failures in btrfs_balance() lacks raid56 support. Reason: Above code was wroten in 2012-08-01, together with btrfs_calc_num_tolerated_disk_barrier_failures()'s first version. Then,

Re: BTRFS raid6 unmountable after a couple of days of usage.

2015-07-16 Thread Austin S Hemmelgarn
On 2015-07-14 07:49, Austin S Hemmelgarn wrote: So, after experiencing this same issue multiple times (on almost a dozen different kernel versions since 4.0) and ruling out the possibility of it being caused by my hardware (or at least, the RAM, SATA controller and disk drives themselves),

Re: [PATCH] Btrfs: incremental send, fix clone operations for compressed extents

2015-07-16 Thread Jan Alexander Steffens
On Sun, May 3, 2015 at 2:56 AM, Filipe Manana fdman...@suse.com wrote: Marc reported a problem where the receiving end of an incremental send was performing clone operations that failed with -EINVAL. This happened because, unlike for uncompressed extents, we were not checking if the source

[PATCH] generic/311: Disable dmesg check

2015-07-16 Thread Chandan Rajendra
When running generic/311 on Btrfs' subpagesize-blocksize patchset (on ppc64 with 4k sectorsize and 16k node/leaf size) I noticed the following call trace, BTRFS (device dm-0): parent transid verify failed on 29720576 wanted 160 found 158 BTRFS (device dm-0): parent transid verify failed on

Strange data backref offset?

2015-07-16 Thread Qu Wenruo
Hi all, While I'm developing a new btrfs inband dedup mechanism, I found btrfsck and kernel doing strange behavior for clone. [Reproducer] # mount /dev/sdc -t btrfs /mnt/test # dd if=/dev/zero of=/mnt/test/file1 bs=4K count=4 # sync # ~/xfstests/src/cloner -s 4096 -l 4096 /mnt/test/file1

Re: I'd like a -r flag on btrfs subvolume delete

2015-07-16 Thread Paul Harvey
On 16 July 2015 at 17:59, Hugo Mills h...@carfax.org.uk wrote: On Thu, Jul 16, 2015 at 01:12:03PM +1000, Paul Harvey wrote: I for one would love to see authoritative documentation on proper subvolume organization. I was completely lost when writing snazzer and have so far received very little

Re: I'd like a -r flag on btrfs subvolume delete

2015-07-16 Thread Chris Murphy
On Thu, Jul 16, 2015 at 4:06 AM, Paul Harvey csir...@gmail.com wrote: On Thu, 16 Jul 2015 17:59 Hugo Mills h...@carfax.org.uk wrote: On Thu, Jul 16, 2015 at 01:12:03PM +1000, Paul Harvey wrote: On 16 July 2015 at 11:35, Chris Murphy li...@colorremedies.com wrote: On Wed, Jul 15, 2015 at