[PATCH] btrfs-progs: tests: add 020-extent-ref-cases

2016-05-29 Thread Lu Fengqi
In order to confirm that btrfsck supports to check a variety of refs, add the following cases: * keyed_block_ref * keyed_data_ref * shared_block_ref * shared_data_ref * no_inline_ref (a extent item without inline ref) * no_skinny_ref Signed-off-by: Lu Fengqi --- In

Re: [regression] make sure seed is writeable sprout after device add

2016-05-29 Thread Chris Murphy
On Sun, May 29, 2016 at 8:03 PM, Chris Murphy wrote: > > # lsblk -o +UUID > NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT UUID > loop07:0010G 0 loop /mnt/0 > 63288b0c-9216-4f11-aed4-cc054ae90e07 > loop17:1010G 0 loop >

Re: [regression] make sure seed is writeable sprout after device add

2016-05-29 Thread Chris Murphy
With 4.5.5 the 'mount -o remount,rw' works like the wiki describes, and is in my opinion contrary to the mount man page. After the -o remount,rw following btrfs dev add VG/sprout, I get this partial: # lsblk -o +UUID NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT UUID │

Re: Functional difference between "replace" vs "add" then "delete missing" with a missing disk in a RAID56 array

2016-05-29 Thread Duncan
Chris Johnson posted on Sun, 29 May 2016 09:33:49 -0700 as excerpted: > Situation: A six disk RAID5/6 array with a completely failed disk. The > failed disk is removed and an identical replacement drive is plugged in. First of all, be aware (as you already will be if you're following the list)

Re: [regression] make sure seed is writeable sprout after device add

2016-05-29 Thread Chris Murphy
On Sun, May 29, 2016 at 1:48 PM, Anand Jain wrote: > Originally a seed FS becomes a writeable sprout FS after a > device is added to it, however as at 4.6 I don't see this > behavior anymore. I think the old behavior where it's possible to use -o remount,rw is actually

Re: Hot data tracking / hybrid storage

2016-05-29 Thread Ferry Toth
Op Sun, 29 May 2016 12:33:06 -0600, schreef Chris Murphy: > On Sun, May 29, 2016 at 12:03 PM, Holger Hoffstätte > wrote: >> On 05/29/16 19:53, Chris Murphy wrote: >>> But I'm skeptical of bcache using a hidden area historically for the >>> bootloader, to put its

Re: [PATCH 1/5] Btrfs: test_check_exists: Fix infinite loop when searching for free space entries

2016-05-29 Thread Feifei Xu
On 2016/5/27 23:43, Josef Bacik wrote: fs/btrfs/free-space-cache.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 5e6062c..05c9ef8 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -3662,6

[regression] make sure seed is writeable sprout after device add

2016-05-29 Thread Anand Jain
Originally a seed FS becomes a writeable sprout FS after a device is added to it, however as at 4.6 I don't see this behavior anymore. This, the above feature is quite unique to btrfs, and there are some good future solutions on top it. So please preserve this feature and here is a test case [1]

[PATCH] btrfs: failed to create sprout should set back to rdonly

2016-05-29 Thread Anand Jain
btrfs_init_new_device() should put the FS back to RDONLY if init fails in the seed_device context. Further it adds the following clean up: - fixes a bug_on to goto label error_trans: - move btrfs_abort_transaction() label error_trans: and - as there is no code to undo the btrfs_prepare_sprout()

[PATCH] fstests: btrfs: test case to make sure seed FS is writable after device add

2016-05-29 Thread Anand Jain
Originally when the device is added to a seed FS, the mount point converts to writeable. However there appears to be a regression that in 4.6 the sprouted FS still remains read-only. Traced back untill 3.8 and still there is regression. Seed sprout btrfs feature is one of the unique feature of

Re: Hot data tracking / hybrid storage

2016-05-29 Thread Chris Murphy
On Sun, May 29, 2016 at 12:03 PM, Holger Hoffstätte wrote: > On 05/29/16 19:53, Chris Murphy wrote: >> But I'm skeptical of bcache using a hidden area historically for the >> bootloader, to put its device metadata. I didn't realize that was the >> case. Imagine if

Re: Resize doesnt work as expected

2016-05-29 Thread Chris Murphy
On Sun, May 29, 2016 at 12:16 PM, Peter Becker wrote: > 2016-05-29 19:11 GMT+02:00 Chris Murphy : >> On Sat, May 28, 2016 at 3:42 PM, Peter Becker wrote: >>> Thanks for the clarification. I've probably overlooked this. >>> >>>

Re: Resize doesnt work as expected

2016-05-29 Thread Peter Becker
2016-05-29 19:11 GMT+02:00 Chris Murphy : > On Sat, May 28, 2016 at 3:42 PM, Peter Becker wrote: >> Thanks for the clarification. I've probably overlooked this. >> >> But should "resize max" does not do what you expect instead of falling >> back on an

Re: Hot data tracking / hybrid storage

2016-05-29 Thread Holger Hoffstätte
On 05/29/16 19:53, Chris Murphy wrote: > But I'm skeptical of bcache using a hidden area historically for the > bootloader, to put its device metadata. I didn't realize that was the > case. Imagine if LVM were to stuff metadata into the MBR gap, or > mdadm. Egads. On the matter of bcache in

Re: Hot data tracking / hybrid storage

2016-05-29 Thread Chris Murphy
On Sun, May 29, 2016 at 12:23 AM, Andrei Borzenkov wrote: > 20.05.2016 20:59, Austin S. Hemmelgarn пишет: >> On 2016-05-20 13:02, Ferry Toth wrote: >>> We have 4 1TB drives in MBR, 1MB free at the beginning, grub on all 4, >>> then 8GB swap, then all the rest btrfs (no LVM

Re: Resize doesnt work as expected

2016-05-29 Thread Chris Murphy
On Sat, May 28, 2016 at 3:42 PM, Peter Becker wrote: > Thanks for the clarification. I've probably overlooked this. > > But should "resize max" does not do what you expect instead of falling > back on an "invisible" 1? How does it know what the user expects? I think the

Functional difference between "replace" vs "add" then "delete missing" with a missing disk in a RAID56 array

2016-05-29 Thread Chris Johnson
Situation: A six disk RAID5/6 array with a completely failed disk. The failed disk is removed and an identical replacement drive is plugged in. Here I have two options for replacing the disk, assuming the old drive is device 6 in the superblock and the replacement disk is /dev/sda. 'btrfs

Re: Some ideas for improvements

2016-05-29 Thread Dmitry Katsubo
On 2016-05-25 21:03, Duncan wrote: > Dmitry Katsubo posted on Wed, 25 May 2016 16:45:41 +0200 as excerpted: >> * Would be nice if 'btrfs scrub status' shows estimated finishing time >> (ETA) and throughput (in Mb/s). > > That might not be so easy to implement. (Caveat, I'm not a dev, just a >

Re: [PULL] Btrfs for 4.7, part 2

2016-05-29 Thread Chris Mason
On Sat, May 28, 2016 at 01:14:13PM +0800, Anand Jain wrote: On 05/27/2016 11:42 PM, Chris Mason wrote: I'm getting errors from btrfs fi show -d, after the very last round of device replaces. A little extra debugging: bytenr mismatch, want=4332716032, have=0 ERROR: cannot read chunk root

Re: [PATCH v3 16/22] btrfs-progs: convert: Introduce function to migrate reserved ranges

2016-05-29 Thread Qu Wenruo
On 05/28/2016 11:16 AM, Liu Bo wrote: On Fri, Jan 29, 2016 at 01:03:26PM +0800, Qu Wenruo wrote: Introduce new function, migrate_reserved_ranges() to migrate used fs data in btrfs reserved space. Unlike old implement, which will need to relocate all the complicated csum and reference

Re: [PATCH v3 21/22] btrfs-progs: convert: Strictly avoid meta or system chunk allocation

2016-05-29 Thread Qu Wenruo
On 05/28/2016 11:30 AM, Liu Bo wrote: On Fri, Jan 29, 2016 at 01:03:31PM +0800, Qu Wenruo wrote: Before this patch, btrfs-convert only rely on large enough initial system/metadata chunk size to ensure no newer system/meta chunk will be created. But that's not safe enough. So add two new

Re: [PATCH v3 05/22] btrfs-progs: Introduce function to setup temporary superblock

2016-05-29 Thread Qu Wenruo
On 05/28/2016 11:04 AM, Liu Bo wrote: On Fri, Jan 29, 2016 at 01:03:15PM +0800, Qu Wenruo wrote: Introduce a new function, setup_temp_super(), to setup temporary super for make_btrfs_v2(). Signed-off-by: Qu Wenruo Signed-off-by: David Sterba ---

Re: [PATCH] btrfs,vfs: allow FILE_EXTENT_SAME on a file opened ro

2016-05-29 Thread Andrei Borzenkov
29.05.2016 03:56, Zygo Blaxell пишет: >> >> I don't think this can happen on btrfs: the superblock is updated only after >> a barrier when both the data and extent refs are already on the disk. > > If and only if the filesystem is mounted with the flushoncommit option, > that's true. This is not

Re: Hot data tracking / hybrid storage

2016-05-29 Thread Andrei Borzenkov
20.05.2016 20:59, Austin S. Hemmelgarn пишет: > On 2016-05-20 13:02, Ferry Toth wrote: >> We have 4 1TB drives in MBR, 1MB free at the beginning, grub on all 4, >> then 8GB swap, then all the rest btrfs (no LVM used). The 4 btrfs >> partitions are in the same pool, which is in btrfs RAID10 format.