Question: raid1 behaviour on failure

2016-04-17 Thread Matthias Bodenbinder
Hi, I have a raid1 with 3 drives: 698, 465 and 232 GB. I copied 1,7 GB data to that raid1, balanced the filesystem and then removed the bigger drive (hotplug). The data was still available. Now I copied the /root directory to the raid1. It showed up via ls -l. Then I plugged in the missing har

Install to or Recover RAID Array Subvolume Root?

2016-04-17 Thread David Alcorn
Debian's default installer (1) can not create a BTRFS raid array during installation, and (2) installs to the default subvol of the BTRFS target. The default subvol is 5 (BTRFS root) unless (i) prior to installation a BTRFS file-system was created, (ii) the default subvol is set to something other

[PATCH 1/3] btrfs-progs: Fix return value bug of qgroups check

2016-04-17 Thread Qu Wenruo
Before this patch, although btrfsck will check qgroups if quota is enabled, it always return 0 even qgroup numbers are corrupted. Fix it by allowing return value from report_qgroups function (formally defined as print_qgroup_difference). Signed-off-by: Qu Wenruo --- cmds-check.c| 8 ++--

[PATCH 2/3] btrfs-progs: Fix an extent buffer leak in qgroups check

2016-04-17 Thread Qu Wenruo
Qgroup verify codes will read fs root to check if the subvolume exists. But it forgot to free the extent buffer read out, only freeing the memory. Fix it by also freeing the extent buffers. Signed-off-by: Qu Wenruo --- qgroup-verify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 3/3] btrfs-progs: Read qgroup status for qgroup verify

2016-04-17 Thread Qu Wenruo
Read qgroup status for its flags like QGROUP_STATUS_FLAG_RESCAN and QGROUP_STATUS_FLAG_INCONSISTENT. This will help to avoid false alert for case like qgroup rescan is still running when un-mounted. Signed-off-by: Qu Wenruo --- qgroup-verify.c | 33 +++-- 1 file chan

WARN: volumes.c:2376 btrfs_init_new_device+0xcd8/0xed0 RIP: btrfs_show_devname+0x4b/0xd0

2016-04-17 Thread Chris Murphy
https://bugzilla.kernel.org/show_bug.cgi?id=116601 Call traces attached to the bug. The short version is that after (accidentally) adding a 256K 2nd device to an existing Btrfs (seed) volume, there's a warning then an oops and then the system becomes unstable and needs to be rebooted soon thereaf

Re: [resend] btrfs-send -c fails: reproduction case

2016-04-17 Thread Zachary Vance
+linux-btrfs and with new policy On 04/16/2016 08:37 PM, Duncan wrote: > Zachary Vance posted on Sat, 16 Apr 2016 13:08:17 -0700 as excerpted: > >> Reproduction case after running into the same problem as Paride >> Legovini: >> http://article.gmane.org/gmane.comp.file-systems.btrfs/48706/match=sen

Re: [PATCH v3] btrfs: qgroup: Fix qgroup accounting when creating snapshot

2016-04-17 Thread Qu Wenruo
Mark Fasheh wrote on 2016/04/15 09:00 -0700: On Fri, Apr 15, 2016 at 09:00:06AM +0800, Qu Wenruo wrote: Mark Fasheh wrote on 2016/04/14 14:42 -0700: Hi Qu, On Thu, Apr 14, 2016 at 01:38:40PM +0800, Qu Wenruo wrote: Current btrfs qgroup design implies a requirement that after calling btrfs

Re: [PATCH] btrfs-progs: Restrict e2fsprogs version for new convert

2016-04-17 Thread Qu Wenruo
David Sterba wrote on 2016/04/15 13:17 +0200: On Thu, Apr 14, 2016 at 02:24:34PM +0800, Qu Wenruo wrote: New btrfs-convert is using a lot of new macro in e2fsprogs 1.42. Unfortunately the new compatible layer for older e2fsprogs is still under development. It hasn't been released yet so it's

Re: Missing device handling

2016-04-17 Thread Chris Murphy
On Mon, Apr 11, 2016 at 5:32 AM, Austin S. Hemmelgarn wrote: > On 2016-04-09 03:24, Duncan wrote: >> >> Yauhen Kharuzhy posted on Fri, 08 Apr 2016 22:53:00 +0300 as excerpted: >> >>> On Fri, Apr 08, 2016 at 03:23:28PM -0400, Austin S. Hemmelgarn wrote: I would personally suggest add

Re: Kernel crash if both devices in raid1 are failing

2016-04-17 Thread Chris Murphy
On Thu, Apr 14, 2016 at 2:30 PM, Dmitry Katsubo wrote: > Dear btrfs community, > > I have the following setup: > > # btrfs fi show /home > Label: none uuid: 865f8cf9-27be-41a0-85a4-6cb4d1658ce3 > Total devices 3 FS bytes used 55.68GiB > devid1 size 52.91GiB used 0.00B path /de

Re: Kernel crash if both devices in raid1 are failing

2016-04-17 Thread Dmitry Katsubo
On 2016-04-14 22:30, Dmitry Katsubo wrote: > Dear btrfs community, > > I have the following setup: > > # btrfs fi show /home > Label: none uuid: 865f8cf9-27be-41a0-85a4-6cb4d1658ce3 > Total devices 3 FS bytes used 55.68GiB > devid1 size 52.91GiB used 0.00B path /dev/sdd2 >

Re: [resend] btrfs-send -c fails: reproduction case

2016-04-17 Thread Chris Murphy
On Sun, Apr 17, 2016 at 3:55 PM, Zachary Vance wrote: > To recap, the basic problem is that you can get into a state where > "btrfs-send -c" fails for a subvolume, with "ERROR: parent > determination failed for 9622". It appears the problem happens when > the 'parent_uuid' does not exist. > > I'm

[resend] btrfs-send -c fails: reproduction case

2016-04-17 Thread Zachary Vance
Apologies for the repeat send for anyone that gets this twice; I was informed there was a problem with my mail setup and many ISPs would block the first message. I have also simplified the reproduction case. --- Reproduction case after running into the same problem as Paride Legovini: http://art

Re: BUG at fs/btrfs/inode.c:1828! RIP: btrfs_merge_bio_hook+0x8b/0xa0 [btrfs]

2016-04-17 Thread Chris Murphy
On Fri, Apr 15, 2016 at 6:07 PM, Liu Bo wrote: > On Fri, Apr 15, 2016 at 09:28:49AM -0600, Chris Murphy wrote: >> Note this is a testing VM, no user data is at risk >> >> https://bugzilla.kernel.org/show_bug.cgi?id=116331 > > From the call stack we can tell that btrfs_root_bytenr() returns 0 > som

Re: [PATCH] Btrfs: subpage-blocksize: Define extent_buffer_head.

2016-04-17 Thread kbuild test robot
-Rajendra/Btrfs-subpage-blocksize-Define-extent_buffer_head/20160417-202933 config: xtensa-allyesconfig (attached as .config) reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save

Re: [PATCH] Btrfs: subpage-blocksize: btrfs_punch_hole: Fix uptodate blocks check

2016-04-17 Thread kbuild test robot
-btrfs_punch_hole-Fix-uptodate-blocks-check/20160417-201821 base: https://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git next config: i386-randconfig-x008-04171808 (attached as .config) reproduce: # save the attached .config to linux build tree make ARCH=i386 All

Re: [PATCH V17 00/18] Allow I/O on blocks whose size is less than page size

2016-04-17 Thread Chandan Rajendra
On Thursday 14 Apr 2016 19:08:09 Chandan Rajendra wrote: > Btrfs assumes block size to be the same as the machine's page > size. This would mean that a Btrfs instance created on a 4k page size > machine (e.g. x86) will not be mountable on machines with larger page > sizes (e.g. PPC64/AARCH64). This

[PATCH] Btrfs: subpage-blocksize: Prevent writes to an extent buffer when PG_writeback flag is set

2016-04-17 Thread Chandan Rajendra
In non-subpage-blocksize scenario, BTRFS_HEADER_FLAG_WRITTEN flag prevents Btrfs code from writing into an extent buffer whose pages are under writeback. This facility isn't sufficient for achieving the same in subpage-blocksize scenario, since we have more than one extent buffer mapped to a page.

[PATCH] Btrfs: subpage-blocksize: Define extent_buffer_head.

2016-04-17 Thread Chandan Rajendra
In order to handle multiple extent buffers per page, first we need to create a way to handle all the extent buffers that are attached to a page. This patch creates a new data structure 'struct extent_buffer_head', and moves fields that are common to all extent buffers from 'struct extent_buffer' t

[PATCH] Btrfs: subpage-blocksize: Make sure delalloc range intersects with the locked page's range

2016-04-17 Thread Chandan Rajendra
find_delalloc_range indirectly depends on EXTENT_UPTODDATE to make sure that the delalloc range returned intersects with the file range mapped by the page. Since we now track "uptodate" state in a per-page bitmap (i.e. in btrfs_page_private->bstate), this commit makes an explicit check to make sure

[PATCH] Btrfs: subpage-blocksize: btrfs_punch_hole: Fix uptodate blocks check

2016-04-17 Thread Chandan Rajendra
In case of subpage-blocksize, the file blocks to be punched may map only part of a page. For file blocks inside such pages, we need to check for the presence of BLK_STATE_UPTODATE flag. Signed-off-by: Chandan Rajendra --- fs/btrfs/file.c | 66 +

[PATCH] Btrfs: subpage-blocksize: btrfs_punch_hole: Fix uptodate blocks check

2016-04-17 Thread Chandan Rajendra
In case of subpage-blocksize, the file blocks to be punched may map only part of a page. For file blocks inside such pages, we need to check for the presence of BLK_STATE_UPTODATE flag. Signed-off-by: Chandan Rajendra --- fs/btrfs/file.c | 66 +

Re: [ANN] fienode: compute SHA1 hash of file extents for finding CoW copies

2016-04-17 Thread Peter Waller
In the same vein, I've also made https://github.com/pwaller/sharedextents - which exits with status 0 when there are shared extents, and 1 otherwise; it also prints the number and percentage of shared bytes. Here it is running on the file and its reflink copy from "A BTRFS mystery" in the previous

Re: [PATCH 41/42] block: do not use REQ_FLUSH for tracking flush support

2016-04-17 Thread Juergen Gross
On 15/04/16 21:16, mchri...@redhat.com wrote: > From: Mike Christie > > The last patch added a REQ_OP_FLUSH for request_fn drivers > and the next patch renames REQ_FLUSH to REQ_PREFLUSH which > will be used by file systems and make_request_fn drivers so > they can send a write/flush combo. > > T

[ANN] fienode: compute SHA1 hash of file extents for finding CoW copies

2016-04-17 Thread Peter Waller
Hi All, I just released a toy program, "fienode" which computes a SHA1 of the physical extents of a file. Link: https://github.com/pwaller/fienode There are some questions around on the internet of how to find CoW copies, which I've answered: http://unix.stackexchange.com/questions/263309/how-t