Re: btrfs support for filesystems >8TB on 32bit architectures

2016-11-10 Thread Qu Wenruo
At 11/11/2016 11:48 AM, Marc MERLIN wrote: On Tue, Nov 08, 2016 at 06:05:19PM -0800, Marc MERLIN wrote: On Wed, Nov 09, 2016 at 09:50:08AM +0800, Qu Wenruo wrote: Yeah, quite possible! The truth is, current btrfs check only checks: 1) Metadata while --check-data-csum option will check dat

Re: btrfs support for filesystems >8TB on 32bit architectures

2016-11-10 Thread Marc MERLIN
On Tue, Nov 08, 2016 at 06:05:19PM -0800, Marc MERLIN wrote: > On Wed, Nov 09, 2016 at 09:50:08AM +0800, Qu Wenruo wrote: > > Yeah, quite possible! > > > > The truth is, current btrfs check only checks: > > 1) Metadata > >while --check-data-csum option will check data, but still > >follow

Re: [PATCH] Btrfs: deal with existing encompassing extent map in btrfs_get_extent()

2016-11-10 Thread Liu Bo
On Thu, Nov 10, 2016 at 04:06:51PM +0100, David Sterba wrote: > On Wed, Nov 09, 2016 at 03:26:50PM -0800, Omar Sandoval wrote: > > From: Omar Sandoval > > > > My QEMU VM was seeing inexplicable I/O errors that I tracked down to > > errors coming from the qcow2 virtual drive in the host system. Th

Re: [PATCH] Btrfs: deal with existing encompassing extent map in btrfs_get_extent()

2016-11-10 Thread Omar Sandoval
On Thu, Nov 10, 2016 at 02:38:14PM -0800, Liu Bo wrote: > On Thu, Nov 10, 2016 at 12:24:13PM -0800, Omar Sandoval wrote: > > On Thu, Nov 10, 2016 at 12:09:06PM -0800, Omar Sandoval wrote: > > > On Thu, Nov 10, 2016 at 12:01:20PM -0800, Liu Bo wrote: > > > > On Wed, Nov 09, 2016 at 03:26:50PM -0800,

Re: [PATCH] Btrfs: deal with existing encompassing extent map in btrfs_get_extent()

2016-11-10 Thread Liu Bo
On Thu, Nov 10, 2016 at 12:24:13PM -0800, Omar Sandoval wrote: > On Thu, Nov 10, 2016 at 12:09:06PM -0800, Omar Sandoval wrote: > > On Thu, Nov 10, 2016 at 12:01:20PM -0800, Liu Bo wrote: > > > On Wed, Nov 09, 2016 at 03:26:50PM -0800, Omar Sandoval wrote: > > > > From: Omar Sandoval > > > > > >

Re: [PATCH] Btrfs: deal with existing encompassing extent map in btrfs_get_extent()

2016-11-10 Thread Omar Sandoval
On Thu, Nov 10, 2016 at 12:09:06PM -0800, Omar Sandoval wrote: > On Thu, Nov 10, 2016 at 12:01:20PM -0800, Liu Bo wrote: > > On Wed, Nov 09, 2016 at 03:26:50PM -0800, Omar Sandoval wrote: > > > From: Omar Sandoval > > > > > > My QEMU VM was seeing inexplicable I/O errors that I tracked down to >

[bug report] btrfs: Expoert and move leaf/subtree qgroup helpers to qgroup.c

2016-11-10 Thread Dan Carpenter
Hello Qu Wenruo, The patch 4c98cc4b6d12: "btrfs: Expoert and move leaf/subtree qgroup helpers to qgroup.c" from Oct 18, 2016, leads to the following static checker warning: fs/btrfs/qgroup.c:1682 btrfs_qgroup_trace_subtree() error: buffer overflow 'path->nodes' 8 <= 8 fs/btrfs/qg

Re: [PATCH] Btrfs: deal with existing encompassing extent map in btrfs_get_extent()

2016-11-10 Thread Omar Sandoval
On Thu, Nov 10, 2016 at 12:01:20PM -0800, Liu Bo wrote: > On Wed, Nov 09, 2016 at 03:26:50PM -0800, Omar Sandoval wrote: > > From: Omar Sandoval > > > > My QEMU VM was seeing inexplicable I/O errors that I tracked down to > > errors coming from the qcow2 virtual drive in the host system. The qcow

Re: [patch] block: precedence bug in bio_set_op_attrs() macro

2016-11-10 Thread Christoph Hellwig
On Thu, Nov 10, 2016 at 11:04:38PM +0300, Dan Carpenter wrote: > This code causes a problem for flush_epd_write_bio() because | has > higher precedence than ?: so it basically turns into: > > ((bio)->bi_opf |= REQ_SYNC; > > Which is wrong. Its is. And while we're at it the macro should re

[patch] block: precedence bug in bio_set_op_attrs() macro

2016-11-10 Thread Dan Carpenter
This code causes a problem for flush_epd_write_bio() because | has higher precedence than ?: so it basically turns into: ((bio)->bi_opf |= REQ_SYNC; Which is wrong. Fixes: ef295ecf090d ("block: better op and flags encoding") Signed-off-by: Dan Carpenter diff --git a/include/linux/blk_t

bi_vcnt checks for repair

2016-11-10 Thread Christoph Hellwig
Hi all, btrfs_check_repairable and bio_readpage_error have somewhat odd looking check for bi_vcnt, checking on how to proceed based on that. Does anyone remember what they actually are checking for? Depending on the exact devices merging bi_vcnt can mean quite a few different things, and we shou

Re: [PATCH] Btrfs: deal with existing encompassing extent map in btrfs_get_extent()

2016-11-10 Thread Liu Bo
On Wed, Nov 09, 2016 at 03:26:50PM -0800, Omar Sandoval wrote: > From: Omar Sandoval > > My QEMU VM was seeing inexplicable I/O errors that I tracked down to > errors coming from the qcow2 virtual drive in the host system. The qcow2 > file is a nocow file on my Btrfs drive, which QEMU opens with

Re: [PATCH] Btrfs: deal with existing encompassing extent map in btrfs_get_extent()

2016-11-10 Thread Holger Hoffstätte
On 11/10/16 17:20, Omar Sandoval wrote: > On Thu, Nov 10, 2016 at 05:01:44PM +0100, Holger Hoffstätte wrote: >> On 11/10/16 16:37, Omar Sandoval wrote: >>> On Thu, Nov 10, 2016 at 04:11:35PM +0100, Holger Hoffstätte wrote: On 11/10/16 00:26, Omar Sandoval wrote: > From: Omar Sandoval

Re: [PATCH] Btrfs: deal with existing encompassing extent map in btrfs_get_extent()

2016-11-10 Thread Omar Sandoval
On Thu, Nov 10, 2016 at 05:01:44PM +0100, Holger Hoffstätte wrote: > On 11/10/16 16:37, Omar Sandoval wrote: > > On Thu, Nov 10, 2016 at 04:11:35PM +0100, Holger Hoffstätte wrote: > >> On 11/10/16 00:26, Omar Sandoval wrote: > >>> From: Omar Sandoval > >>> > >>> My QEMU VM was seeing inexplicable

Re: [PATCH] f2fs: support multiple devices

2016-11-10 Thread Anand Jain
(this is deviating from the subject, sorry about that) Pretty much, if you're using just raid1 mode, without compression, on reasonable storage devices, things are rock-solid relative to the rest of BTRFS. IMO, BTRFS volume manger feature is incomplete and there is RAID1 critical bug which

Re: [PATCH] Btrfs: deal with existing encompassing extent map in btrfs_get_extent()

2016-11-10 Thread Holger Hoffstätte
On 11/10/16 16:37, Omar Sandoval wrote: > On Thu, Nov 10, 2016 at 04:11:35PM +0100, Holger Hoffstätte wrote: >> On 11/10/16 00:26, Omar Sandoval wrote: >>> From: Omar Sandoval >>> >>> My QEMU VM was seeing inexplicable I/O errors that I tracked down to >>> errors coming from the qcow2 virtual driv

Re: [PATCH] Btrfs: deal with existing encompassing extent map in btrfs_get_extent()

2016-11-10 Thread Omar Sandoval
On Thu, Nov 10, 2016 at 04:06:51PM +0100, David Sterba wrote: > On Wed, Nov 09, 2016 at 03:26:50PM -0800, Omar Sandoval wrote: > > From: Omar Sandoval > > > > My QEMU VM was seeing inexplicable I/O errors that I tracked down to > > errors coming from the qcow2 virtual drive in the host system. Th

Re: [PATCH] Btrfs: deal with existing encompassing extent map in btrfs_get_extent()

2016-11-10 Thread Holger Hoffstätte
On 11/10/16 16:06, David Sterba wrote: > On Wed, Nov 09, 2016 at 03:26:50PM -0800, Omar Sandoval wrote: >> From: Omar Sandoval >> [snip] >> Commit 8dff9c853410 ("Btrfs: deal with duplciates during extent_map >> insertion in btrfs_get_extent") fixed a case in btrfs_get_extent() where >> two threads

Re: [PATCH] Btrfs: deal with existing encompassing extent map in btrfs_get_extent()

2016-11-10 Thread Omar Sandoval
On Thu, Nov 10, 2016 at 04:11:35PM +0100, Holger Hoffstätte wrote: > On 11/10/16 00:26, Omar Sandoval wrote: > > From: Omar Sandoval > > > > My QEMU VM was seeing inexplicable I/O errors that I tracked down to > > errors coming from the qcow2 virtual drive in the host system. The qcow2 > > file i

Re: btrfs btree_ctree_super fault

2016-11-10 Thread Chris Mason
On 11/10/2016 09:35 AM, Dave Jones wrote: On Tue, Nov 08, 2016 at 10:08:04AM -0500, Chris Mason wrote: > > And another new one: > > > > kernel BUG at fs/btrfs/ctree.c:3172! > > > > Call Trace: > > [] __btrfs_drop_extents+0xb00/0xe30 [btrfs] > > We've been hunting this one for at least t

Re: [PATCH] Btrfs: deal with existing encompassing extent map in btrfs_get_extent()

2016-11-10 Thread Holger Hoffstätte
On 11/10/16 00:26, Omar Sandoval wrote: > From: Omar Sandoval > > My QEMU VM was seeing inexplicable I/O errors that I tracked down to > errors coming from the qcow2 virtual drive in the host system. The qcow2 > file is a nocow file on my Btrfs drive, which QEMU opens with O_DIRECT. > Every once

Re: [PATCH] Btrfs: deal with existing encompassing extent map in btrfs_get_extent()

2016-11-10 Thread David Sterba
On Wed, Nov 09, 2016 at 03:26:50PM -0800, Omar Sandoval wrote: > From: Omar Sandoval > > My QEMU VM was seeing inexplicable I/O errors that I tracked down to > errors coming from the qcow2 virtual drive in the host system. The qcow2 > file is a nocow file on my Btrfs drive, which QEMU opens with

[PATCH] btrfs-progs: Fix extents after finding all errors

2016-11-10 Thread Goldwyn Rodrigues
Simplifying the logic of fixing. Calling fixup_extent_ref() after encountering every error causes more error messages after the extent is fixed. In case of multiple errors, this is confusing because the error message is displayed after the fix message and it works on stale data. It is best to show

[PATCH] Return best entry, if it is the first one

2016-11-10 Thread Goldwyn Rodrigues
The find_most_right_entry() tends to miss on the best entry if it is the first one on the list and there are only two entries in the list. So, we assign both prev and best to entry. To do this, the selection process (rather the rejection) has to be performed earlier to skip on broken==count. Sign

[PULL] Btrfs fixes for 4.9-rc5

2016-11-10 Thread David Sterba
Hi, two minor error handling fixes and one fix for balance sttus item that goes back to 4.4. The branch continues from my last pull that went to Linus' tree, so it would be a good idea to do the same as before. I've added a signed tag for branch. -

Re: btrfs btree_ctree_super fault

2016-11-10 Thread Dave Jones
On Tue, Nov 08, 2016 at 10:08:04AM -0500, Chris Mason wrote: > > And another new one: > > > > kernel BUG at fs/btrfs/ctree.c:3172! > > > > Call Trace: > > [] __btrfs_drop_extents+0xb00/0xe30 [btrfs] > > We've been hunting this one for at least two years. It's the white > whale of bt

Re:

2016-11-10 Thread bepi
Hi. P.S. Sorry for the double sending and for the blank email subject. Yes. The various controls are designed to be used separated, and to be launched both as cronjobs and manually. For example you can create a series of snapshots btrsfManage SNAPSHOT / and send the new snapshots (incremen

Re: [PATCH] f2fs: support multiple devices

2016-11-10 Thread Austin S. Hemmelgarn
On 2016-11-09 21:29, Qu Wenruo wrote: At 11/10/2016 06:57 AM, Andreas Dilger wrote: On Nov 9, 2016, at 1:56 PM, Jaegeuk Kim wrote: This patch implements multiple devices support for f2fs. Given multiple devices by mkfs.f2fs, f2fs shows them entirely as one big volume under one f2fs instance

[PATCH] Fs: Btrfs - Improvement in code readability when

2016-11-10 Thread Shailendra Verma
From: "Shailendra Verma" There is no need to call kfree() if memdup_user() fails, as no memory was allocated and the error in the error-valued pointer should be returned. Signed-off-by: Shailendra Verma --- fs/btrfs/ioctl.c | 21 ++--- 1 file changed, 6 insertions(+), 15 dele

Re: Deletion of the CoW snapshots causes BTRFS ENOSPC error.

2016-11-10 Thread Qu Wenruo
At 11/10/2016 03:40 PM, Кравцов Роман Владимирович wrote: Hello. We have two CI servers with Docker. Docker uses BTRFS storage driver, also we use BTRFS for storing some data. To perform cloning of the data, are used 'cp --reflink' command. When we trying to remove a few copies of the cloned d

Deletion of the CoW snapshots causes BTRFS ENOSPC error.

2016-11-10 Thread Кравцов Роман Владимирович
Hello. We have two CI servers with Docker. Docker uses BTRFS storage driver, also we use BTRFS for storing some data. To perform cloning of the data, are used 'cp --reflink' command. When we trying to remove a few copies of the cloned data, the ENOSPC error occurring. This error strongly repr