[PATCH v7 5/8] btrfs-progs: Add dedupe feature for mkfs and convert

2016-03-31 Thread Qu Wenruo
Add new DEDUPE ro compat flag and corresponding mkfs/convert flag 'dedupe'. Since dedupe tree is completely isolated from fs tree, so even old kernel could do read mount. So add it to RO compat flag instead of common incompat flags Signed-off-by: Qu Wenruo --- Documentation/mkfs.btrfs.asciidoc

[PATCH v7 2/8] btrfs-progs: dedupe: Add enable command for dedupe command group

2016-03-31 Thread Qu Wenruo
Add enable subcommand for dedupe commmand group. Signed-off-by: Qu Wenruo --- Documentation/btrfs-dedupe.asciidoc | 105 +++- btrfs-completion| 6 +- cmds-dedupe.c | 155 ioctl.h

[PATCH v7 3/8] btrfs-progs: dedupe: Add disable support for inband dedupelication

2016-03-31 Thread Qu Wenruo
Add disable subcommand for dedupe command group. Signed-off-by: Qu Wenruo --- Documentation/btrfs-dedupe.asciidoc | 5 + btrfs-completion| 2 +- cmds-dedupe.c | 42 + 3 files changed, 48 insertions(+), 1 deletion

[PATCH v7 0/8] Inband dedupe for btrfs-progs

2016-03-31 Thread Qu Wenruo
No much change from previous version. 1) Rebased to latest devel branch 2) Update ctree.h to follow kernel structure change 3) Update print-tree to follow kernel structure change Qu Wenruo (7): btrfs-progs: Basic framework for dedupe command group btrfs-progs: dedupe: Add enable command for

[PATCH v7 8/8] btrfs-progs: property: add a dedupe property

2016-03-31 Thread Qu Wenruo
From: Wang Xiaoguang Normally if we enable online dedupe for a fs, it's filesystem wide de-duplication. With this property, we can explicitly disable data de-duplication for specified files. Signed-off-by: Wang Xiaoguang --- Documentation/btrfs-property.asciidoc | 2 + props.c

[PATCH v7 6/8] btrfs-progs: Add show-super support for new DEDUPE flag

2016-03-31 Thread Qu Wenruo
Now btrfs-show-super can handle DEDUPE ro compat flag. Signed-off-by: Qu Wenruo --- cmds-inspect-dump-super.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/cmds-inspect-dump-super.c b/cmds-inspect-dump-super.c index 3e09ee8..6a939c9 100644 --- a/cmds-inspect-dump-super.

[PATCH v7 1/8] btrfs-progs: Basic framework for dedupe command group

2016-03-31 Thread Qu Wenruo
Add basic ioctl header and command group framework for later use. Alone with basic man page doc. Signed-off-by: Qu Wenruo --- Documentation/Makefile.in | 1 + Documentation/btrfs-dedupe.asciidoc | 39 ++ Documentation/btrfs.asciidoc| 4 Makefi

[PATCH v7 7/8] btrfs-progs: debug-tree: Add dedupe tree support

2016-03-31 Thread Qu Wenruo
Add dedupe tree support for btrfs-debug-tree. Signed-off-by: Qu Wenruo --- cmds-inspect-dump-tree.c | 4 ++ ctree.h | 7 +++ print-tree.c | 118 +++ 3 files changed, 129 insertions(+) diff --git a/cmds-inspect-dump-tre

[PATCH v7 4/8] btrfs-progs: dedupe: Add status subcommand

2016-03-31 Thread Qu Wenruo
Add status subcommand for dedupe command group. Signed-off-by: Qu Wenruo --- Documentation/btrfs-dedupe.asciidoc | 3 ++ btrfs-completion| 2 +- cmds-dedupe.c | 84 + 3 files changed, 88 insertions(+), 1 deletion(-)

[PATCH v10 07/21] btrfs: dedupe: Implement btrfs_dedupe_calc_hash interface

2016-03-31 Thread Qu Wenruo
From: Wang Xiaoguang Unlike in-memory or on-disk dedupe method, only SHA256 hash method is supported yet, so implement btrfs_dedupe_calc_hash() interface using SHA256. Signed-off-by: Qu Wenruo Signed-off-by: Wang Xiaoguang --- fs/btrfs/dedupe.c | 49 +++

[PATCH v10 12/21] btrfs: dedupe: add an inode nodedupe flag

2016-03-31 Thread Qu Wenruo
From: Wang Xiaoguang Introduce BTRFS_INODE_NODEDUP flag, then we can explicitly disable online data dedupelication for specified files. Signed-off-by: Wang Xiaoguang --- fs/btrfs/ctree.h | 1 + fs/btrfs/ioctl.c | 6 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/

[PATCH v10 14/21] btrfs: dedupe: add per-file online dedupe control

2016-03-31 Thread Qu Wenruo
From: Wang Xiaoguang Introduce inode_need_dedupe() to implement per-file online dedupe control. Signed-off-by: Wang Xiaoguang --- fs/btrfs/inode.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 96790d0..c80fd74 1006

[PATCH v10 10/21] btrfs: try more times to alloc metadata reserve space

2016-03-31 Thread Qu Wenruo
From: Wang Xiaoguang In btrfs_delalloc_reserve_metadata(), the number of metadata bytes we try to reserve is calculated by the difference between outstanding_extents and reserved_extents. When reserve_metadata_bytes() fails to reserve desited metadata space, it has already done some reclaim work

[PATCH v10 02/21] btrfs: dedupe: Introduce function to initialize dedupe info

2016-03-31 Thread Qu Wenruo
From: Wang Xiaoguang Add generic function to initialize dedupe info. Signed-off-by: Qu Wenruo Signed-off-by: Wang Xiaoguang --- fs/btrfs/Makefile | 2 +- fs/btrfs/dedupe.c | 154 ++ fs/btrfs/dedupe.h | 16 +- 3 files changed, 169 inse

[PATCH v10 16/21] btrfs: dedupe: Add basic tree structure for on-disk dedupe method

2016-03-31 Thread Qu Wenruo
Introduce a new tree, dedupe tree to record on-disk dedupe hash. As a persist hash storage instead of in-memeory only implement. Unlike Liu Bo's implement, in this version we won't do hack for bytenr -> hash search, but add a new type, DEDUP_BYTENR_ITEM for such search case, just like in-memory ba

[PATCH v10 11/21] btrfs: dedupe: Add ioctl for inband dedupelication

2016-03-31 Thread Qu Wenruo
From: Wang Xiaoguang Add ioctl interface for inband dedupelication, which includes: 1) enable 2) disable 3) status And a pseudo RO compat flag, to imply that btrfs now supports inband dedup. However we don't add any ondisk format change, it's just a pseudo RO compat flag. All these ioctl interf

[PATCH v10 15/21] btrfs: relocation: Enhance error handling to avoid BUG_ON

2016-03-31 Thread Qu Wenruo
Since the introduce of btrfs dedupe tree, it's possible that balance can race with dedupe disabling. When this happens, dedupe_enabled will make btrfs_get_fs_root() return PTR_ERR(-ENOENT). But due to a bug in error handling branch, when this happens backref_cache->nr_nodes is increased but the no

[PATCH v10 08/21] btrfs: ordered-extent: Add support for dedupe

2016-03-31 Thread Qu Wenruo
From: Wang Xiaoguang Add ordered-extent support for dedupe. Note, current ordered-extent support only supports non-compressed source extent. Support for compressed source extent will be added later. Signed-off-by: Qu Wenruo Signed-off-by: Wang Xiaoguang --- fs/btrfs/ordered-data.c | 44 +

[PATCH v10 17/21] btrfs: dedupe: Introduce interfaces to resume and cleanup dedupe info

2016-03-31 Thread Qu Wenruo
Since we will introduce a new on-disk based dedupe method, introduce new interfaces to resume previous dedupe setup. And since we introduce a new tree for status, also add disable handler for it. Signed-off-by: Wang Xiaoguang Signed-off-by: Qu Wenruo --- fs/btrfs/dedupe.c | 197 ++

[PATCH v10 20/21] btrfs: dedupe: Add support for adding hash for on-disk backend

2016-03-31 Thread Qu Wenruo
Now on-disk backend can add hash now. Since all needed on-disk backend functions are added, also allow on-disk backend to be used, by changing DEDUPE_BACKEND_COUNT from 1(inmemory only) to 2 (inmemory + ondisk). Signed-off-by: Wang Xiaoguang Signed-off-by: Qu Wenruo --- fs/btrfs/dedupe.c | 83

[PATCH v10 04/21] btrfs: dedupe: Introduce function to remove hash from in-memory tree

2016-03-31 Thread Qu Wenruo
From: Wang Xiaoguang Introduce static function inmem_del() to remove hash from in-memory dedupe tree. And implement btrfs_dedupe_del() and btrfs_dedup_destroy() interfaces. Signed-off-by: Qu Wenruo Signed-off-by: Wang Xiaoguang --- fs/btrfs/dedupe.c | 105 +

[PATCH v10 06/21] btrfs: dedupe: Introduce function to search for an existing hash

2016-03-31 Thread Qu Wenruo
From: Wang Xiaoguang Introduce static function inmem_search() to handle the job for in-memory hash tree. The trick is, we must ensure the delayed ref head is not being run at the time we search the for the hash. With inmem_search(), we can implement the btrfs_dedupe_search() interface. Signed-

[PATCH v10 19/21] btrfs: dedupe: Add support to delete hash for on-disk backend

2016-03-31 Thread Qu Wenruo
Now on-disk backend can delete hash now. Signed-off-by: Wang Xiaoguang Signed-off-by: Qu Wenruo --- fs/btrfs/dedupe.c | 100 ++ 1 file changed, 100 insertions(+) diff --git a/fs/btrfs/dedupe.c b/fs/btrfs/dedupe.c index 00f2a01..7c5d58a 100644

[PATCH v10 05/21] btrfs: delayed-ref: Add support for increasing data ref under spinlock

2016-03-31 Thread Qu Wenruo
For in-band dedupe, btrfs needs to increase data ref with delayed_ref locked, so add a new function btrfs_add_delayed_data_ref_lock() to increase extent ref with delayed_refs already locked. Signed-off-by: Qu Wenruo --- fs/btrfs/delayed-ref.c | 30 +++--- fs/btrfs/delayed

[PATCH v10 18/21] btrfs: dedupe: Add support for on-disk hash search

2016-03-31 Thread Qu Wenruo
Now on-disk backend should be able to search hash now. Signed-off-by: Wang Xiaoguang Signed-off-by: Qu Wenruo --- fs/btrfs/dedupe.c | 167 -- fs/btrfs/dedupe.h | 1 + 2 files changed, 151 insertions(+), 17 deletions(-) diff --git a/fs/btrfs

[PATCH v10 03/21] btrfs: dedupe: Introduce function to add hash into in-memory tree

2016-03-31 Thread Qu Wenruo
From: Wang Xiaoguang Introduce static function inmem_add() to add hash into in-memory tree. And now we can implement the btrfs_dedupe_add() interface. Signed-off-by: Qu Wenruo Signed-off-by: Wang Xiaoguang --- fs/btrfs/dedupe.c | 151 ++ 1 f

[PATCH v10 13/21] btrfs: dedupe: add a property handler for online dedupe

2016-03-31 Thread Qu Wenruo
From: Wang Xiaoguang We use btrfs extended attribute "btrfs.dedupe" to record per-file online dedupe status, so add a dedupe property handler. Signed-off-by: Wang Xiaoguang --- fs/btrfs/props.c | 41 + 1 file changed, 41 insertions(+) diff --git a/fs/bt

[PATCH v10 01/21] btrfs: dedupe: Introduce dedupe framework and its header

2016-03-31 Thread Qu Wenruo
From: Wang Xiaoguang Introduce the header for btrfs online(write time) de-duplication framework and needed header. The new de-duplication framework is going to support 2 different dedupe methods and 1 dedupe hash. Signed-off-by: Qu Wenruo Signed-off-by: Wang Xiaoguang --- fs/btrfs/ctree.h

[PATCH v10 21/21] btrfs: dedupe: Preparation for compress-dedupe co-work

2016-03-31 Thread Qu Wenruo
For dedupe to work with compression, new members recording compression algorithm and on-disk extent length are needed. Add them for later compress-dedupe co-work. Signed-off-by: Qu Wenruo --- fs/btrfs/ctree.h| 22 +- fs/btrfs/dedupe.c | 78 +

[PATCH v10 09/21] btrfs: dedupe: Inband in-memory only de-duplication implement

2016-03-31 Thread Qu Wenruo
Core implement for inband de-duplication. It reuse the async_cow_start() facility to do the calculate dedupe hash. And use dedupe hash to do inband de-duplication at extent level. The work flow is as below: 1) Run delalloc range for an inode 2) Calculate hash for the delalloc range at the unit of

[PATCH v10 00/21] Btrfs dedupe framework

2016-03-31 Thread Qu Wenruo
This patchset can be fetched from github: https://github.com/adam900710/linux.git wang_dedupe_20160401 In this patchset, we're proud to bring a completely new storage backend: Khala backend. With Khala backend, all dedupe hash will be restored in the Khala, shared with every Kalai protoss, with u

Re: bad metadata crossing stripe boundary

2016-03-31 Thread Marc Haber
On Thu, Mar 31, 2016 at 11:16:30PM +0200, Kai Krakow wrote: > Am Thu, 31 Mar 2016 23:00:04 +0200 > schrieb Marc Haber : > > I find it somewhere between funny and disturbing that the first call > > of btrfs check made my kernel log the following: > > Mar 31 22:45:36 fan kernel: [ 6253.178264] EXT4-f

Re: [PATCH V15 00/15] Btrfs: Subpagesize-blocksize: Allow I/O on blocks whose size is less than page size

2016-03-31 Thread Chandan Rajendra
On Thursday 31 Mar 2016 15:59:11 David Sterba wrote: > On Thu, Mar 31, 2016 at 11:31:06AM +0200, David Sterba wrote: > > On Tue, Mar 22, 2016 at 06:50:32PM +0530, Chandan Rajendra wrote: > > > On Tuesday 22 Mar 2016 12:04:23 David Sterba wrote: > > > > On Thu, Feb 11, 2016 at 11:17:38PM +0530, Chan

Re: [PATCH v9 00/19] Btrfs dedupe framework

2016-03-31 Thread Qu Wenruo
David Sterba wrote on 2016/03/31 18:12 +0200: On Wed, Mar 30, 2016 at 03:55:55PM +0800, Qu Wenruo wrote: This March 30th patchset update mostly addresses the patchset structure comment from David: 1) Change the patchset sequence Not If only apply the first 14 patches, it can provide the fu

Re: fallocate mode flag for "unshare blocks"?

2016-03-31 Thread J. Bruce Fields
On Fri, Apr 01, 2016 at 11:33:00AM +1100, Dave Chinner wrote: > On Thu, Mar 31, 2016 at 06:34:17PM -0400, J. Bruce Fields wrote: > > I haven't looked at the code, but I assume a JUKEBOX-returning write to > > an absent file brings into cache the bits necessary to perform the > > write, but stops sh

Re: btrfsck: backpointer mismatch (and multiple other errors)

2016-03-31 Thread Qu Wenruo
Henk Slager wrote on 2016/04/01 01:27 +0200: On Thu, Mar 31, 2016 at 10:44 PM, Kai Krakow wrote: Hello! I already reported this in another thread but it was a bit confusing by intermixing multiple volumes. So let's start a new thread: Since one of the last kernel upgrades, I'm experiencing

Re: fallocate mode flag for "unshare blocks"?

2016-03-31 Thread Dave Chinner
On Thu, Mar 31, 2016 at 06:34:17PM -0400, J. Bruce Fields wrote: > On Fri, Apr 01, 2016 at 09:20:23AM +1100, Dave Chinner wrote: > > On Thu, Mar 31, 2016 at 01:47:50PM -0600, Andreas Dilger wrote: > > > On Mar 31, 2016, at 12:08 PM, J. Bruce Fields > > > wrote: > > > > > > > > On Thu, Mar 31, 20

Re: [PATCH] btrfs-progs: fsck: Fix a false metadata extent warning

2016-03-31 Thread Qu Wenruo
David Sterba wrote on 2016/03/31 18:30 +0200: On Thu, Mar 31, 2016 at 10:19:34AM +0800, Qu Wenruo wrote: At least 2 user from mail list reported btrfsck reported false alert of "bad metadata [,) crossing stripe boundary". While the reported number are all inside the same 64K boundary.

Re: [PATCH v9 00/19] Btrfs dedupe framework

2016-03-31 Thread Qu Wenruo
David Sterba wrote on 2016/03/31 18:12 +0200: On Wed, Mar 30, 2016 at 03:55:55PM +0800, Qu Wenruo wrote: This March 30th patchset update mostly addresses the patchset structure comment from David: 1) Change the patchset sequence Not If only apply the first 14 patches, it can provide the fu

Re: btrfsck: backpointer mismatch (and multiple other errors)

2016-03-31 Thread Henk Slager
On Thu, Mar 31, 2016 at 10:44 PM, Kai Krakow wrote: > Hello! > > I already reported this in another thread but it was a bit confusing by > intermixing multiple volumes. So let's start a new thread: > > Since one of the last kernel upgrades, I'm experiencing one VDI file > (containing a NTFS image

Re: "/tmp/mnt.", and not honouring compression

2016-03-31 Thread Lionel Bouton
Le 31/03/2016 22:49, Chris Murray a écrit : > Hi, > > I'm trying to troubleshoot a ceph cluster which doesn't seem to be > honouring BTRFS compression on some OSDs. Can anyone offer some help? Is > it likely to be a ceph issue or a BTRFS one? Or something else? I've > asked on ceph-users already, b

Re: "/tmp/mnt.", and not honouring compression

2016-03-31 Thread Duncan
Chris Murray posted on Thu, 31 Mar 2016 21:49:29 +0100 as excerpted: > I'm using Proxmox, based on Debian. Kernel version 4.2.8-1-pve. Btrfs > v3.17. The problem itself is beyond my level, but aiming for the obvious low- hanging fruit... On this list, which is forward looking as btrfs remains st

Re: fallocate mode flag for "unshare blocks"?

2016-03-31 Thread J. Bruce Fields
On Fri, Apr 01, 2016 at 09:20:23AM +1100, Dave Chinner wrote: > On Thu, Mar 31, 2016 at 01:47:50PM -0600, Andreas Dilger wrote: > > On Mar 31, 2016, at 12:08 PM, J. Bruce Fields wrote: > > > > > > On Thu, Mar 31, 2016 at 10:18:50PM +1100, Dave Chinner wrote: > > >> On Thu, Mar 31, 2016 at 12:54:4

Re: fallocate mode flag for "unshare blocks"?

2016-03-31 Thread Dave Chinner
On Thu, Mar 31, 2016 at 01:47:50PM -0600, Andreas Dilger wrote: > On Mar 31, 2016, at 12:08 PM, J. Bruce Fields wrote: > > > > On Thu, Mar 31, 2016 at 10:18:50PM +1100, Dave Chinner wrote: > >> On Thu, Mar 31, 2016 at 12:54:40AM -0700, Christoph Hellwig wrote: > >>> On Thu, Mar 31, 2016 at 12:18:

Re: bad metadata crossing stripe boundary

2016-03-31 Thread Kai Krakow
Am Thu, 31 Mar 2016 23:16:30 +0200 schrieb Kai Krakow : > Am Thu, 31 Mar 2016 23:00:04 +0200 > schrieb Marc Haber : > > > On Thu, Mar 31, 2016 at 10:31:49AM +0800, Qu Wenruo wrote: > > > Would you please try the following patch based on v4.5 > > > btrfs-progs? https://patchwork.kernel.org/patch

Re: bad metadata crossing stripe boundary

2016-03-31 Thread Kai Krakow
Am Thu, 31 Mar 2016 23:00:04 +0200 schrieb Marc Haber : > On Thu, Mar 31, 2016 at 10:31:49AM +0800, Qu Wenruo wrote: > > Would you please try the following patch based on v4.5 btrfs-progs? > > https://patchwork.kernel.org/patch/8706891/ > > This also fixes the "bad metadata crossing stripe boun

Re: [PATCH v2] Btrfs: fix file/data loss caused by fsync after rename and new inode

2016-03-31 Thread Chris Mason
On Wed, Mar 30, 2016 at 11:37:21PM +0100, fdman...@kernel.org wrote: > From: Filipe Manana > > If we rename an inode A (be it a file or a directory), create a new > inode B with the old name of inode A and under the same parent directory, > fsync inode B and then power fail, at log tree replay ti

Re: [PATCH v2] Btrfs: fix file/data loss caused by fsync after rename and new inode

2016-03-31 Thread Duncan
fdmanana posted on Wed, 30 Mar 2016 23:37:21 +0100 as excerpted: > From: Filipe Manana > > If we rename an inode A (be it a file or a directory), create a new > inode B with the old name of inode A and under the same parent > directory, fsync inode B and then power fail, at log tree replay time

Re: bad metadata crossing stripe boundary

2016-03-31 Thread Marc Haber
On Thu, Mar 31, 2016 at 10:31:49AM +0800, Qu Wenruo wrote: > Would you please try the following patch based on v4.5 btrfs-progs? > https://patchwork.kernel.org/patch/8706891/ This also fixes the "bad metadata crossing stripe boundary" on my pet patient. I find it somewhere between funny and distu

"/tmp/mnt.", and not honouring compression

2016-03-31 Thread Chris Murray
Hi, I'm trying to troubleshoot a ceph cluster which doesn't seem to be honouring BTRFS compression on some OSDs. Can anyone offer some help? Is it likely to be a ceph issue or a BTRFS one? Or something else? I've asked on ceph-users already, but not received a response yet. Config is set to mount

btrfsck: backpointer mismatch (and multiple other errors)

2016-03-31 Thread Kai Krakow
Hello! I already reported this in another thread but it was a bit confusing by intermixing multiple volumes. So let's start a new thread: Since one of the last kernel upgrades, I'm experiencing one VDI file (containing a NTFS image with Windows 7) getting damaged when running the machine in Virtu

Re: bad metadata crossing stripe boundary

2016-03-31 Thread Henk Slager
>> Would you please try the following patch based on v4.5 btrfs-progs? >> https://patchwork.kernel.org/patch/8706891/ >> >> According to your output, all the output is false alert. >> All the extent starting bytenr can be divided by 64K, and I think at >> initial time, its 'max_size' may be set to

Re: bad metadata crossing stripe boundary

2016-03-31 Thread Kai Krakow
Am Thu, 31 Mar 2016 10:31:49 +0800 schrieb Qu Wenruo : > Qu Wenruo wrote on 2016/03/31 09:33 +0800: > > > > > > Kai Krakow wrote on 2016/03/28 12:02 +0200: > >> Changing subject to reflect the current topic... > >> > >> Am Sun, 27 Mar 2016 21:55:40 +0800 > >> schrieb Qu Wenruo : > >> > [...]

Re: fallocate mode flag for "unshare blocks"?

2016-03-31 Thread Liu Bo
On Thu, Mar 31, 2016 at 07:18:55AM -0400, Austin S. Hemmelgarn wrote: > On 2016-03-30 20:32, Liu Bo wrote: > >On Wed, Mar 30, 2016 at 11:27:55AM -0700, Darrick J. Wong wrote: > >>Hi all, > >> > >>Christoph and I have been working on adding reflink and CoW support to > >>XFS recently. Since the pur

Re: fallocate mode flag for "unshare blocks"?

2016-03-31 Thread Andreas Dilger
On Mar 31, 2016, at 12:08 PM, J. Bruce Fields wrote: > > On Thu, Mar 31, 2016 at 10:18:50PM +1100, Dave Chinner wrote: >> On Thu, Mar 31, 2016 at 12:54:40AM -0700, Christoph Hellwig wrote: >>> On Thu, Mar 31, 2016 at 12:18:13PM +1100, Dave Chinner wrote: On Wed, Mar 30, 2016 at 11:27:55AM -0

contents incomplete (?)

2016-03-31 Thread Jeff Mahoney
Hi all - I recently spent some time writing up btrfs ioctl decoding for strace to be used in debugging various third party tools (e.g. snapper) in their interactions with btrfs.[1] In doing so, I found that substantial parts of the tree interface haven't been exported via . For my purposes, it w

Re: "bad metadata" not fixed by btrfs repair

2016-03-31 Thread Henk Slager
On Mon, Mar 28, 2016 at 4:37 PM, Marc Haber wrote: > Hi, > > I have a btrfs which btrfs check --repair doesn't fix: > > # btrfs check --repair /dev/mapper/fanbtr > bad metadata [4425377054720, 4425377071104) crossing stripe boundary > bad metadata [4425380134912, 4425380151296) crossing stripe bou

Re: "bad metadata" not fixed by btrfs repair

2016-03-31 Thread Henk Slager
On Thu, Mar 31, 2016 at 4:23 AM, Qu Wenruo wrote: > > > Henk Slager wrote on 2016/03/30 16:03 +0200: >> >> On Wed, Mar 30, 2016 at 9:00 AM, Qu Wenruo >> wrote: >>> >>> First of all. >>> >>> The "crossing stripe boundary" error message itself is *HARMLESS* for >>> recent >>> kernels. >>> >>> It on

Re: "bad metadata" not fixed by btrfs repair

2016-03-31 Thread Henk Slager
On Thu, Mar 31, 2016 at 2:28 AM, Qu Wenruo wrote: > > > Henk Slager wrote on 2016/03/30 16:03 +0200: >> >> On Wed, Mar 30, 2016 at 9:00 AM, Qu Wenruo >> wrote: >>> >>> First of all. >>> >>> The "crossing stripe boundary" error message itself is *HARMLESS* for >>> recent >>> kernels. >>> >>> It on

Re: fallocate mode flag for "unshare blocks"?

2016-03-31 Thread Darrick J. Wong
On Thu, Mar 31, 2016 at 02:08:21PM -0400, J. Bruce Fields wrote: > On Thu, Mar 31, 2016 at 10:18:50PM +1100, Dave Chinner wrote: > > On Thu, Mar 31, 2016 at 12:54:40AM -0700, Christoph Hellwig wrote: > > > On Thu, Mar 31, 2016 at 12:18:13PM +1100, Dave Chinner wrote: > > > > On Wed, Mar 30, 2016 at

Re: fallocate mode flag for "unshare blocks"?

2016-03-31 Thread J. Bruce Fields
On Thu, Mar 31, 2016 at 10:18:50PM +1100, Dave Chinner wrote: > On Thu, Mar 31, 2016 at 12:54:40AM -0700, Christoph Hellwig wrote: > > On Thu, Mar 31, 2016 at 12:18:13PM +1100, Dave Chinner wrote: > > > On Wed, Mar 30, 2016 at 11:27:55AM -0700, Darrick J. Wong wrote: > > > > Or is it ok that falloc

Re: fallocate mode flag for "unshare blocks"?

2016-03-31 Thread Henk Slager
On Thu, Mar 31, 2016 at 5:31 PM, Andreas Dilger wrote: > On Mar 31, 2016, at 1:55 AM, Christoph Hellwig wrote: >> >> On Wed, Mar 30, 2016 at 05:32:42PM -0700, Liu Bo wrote: >>> Well, btrfs fallocate doesn't allocate space if it's a shared one >>> because it thinks the space is already allocated.

Re: [PATCH] btrfs: Reset IO error counters before start of device replacing

2016-03-31 Thread David Sterba
On Tue, Mar 29, 2016 at 02:17:48PM -0700, Yauhen Kharuzhy wrote: > If device replace entry was found on disk at mounting and its num_write_errors > stats counter has non-NULL value, then replace operation will never be > finished and -EIO error will be reported by btrfs_scrub_dev() because > this c

Re: [RESEND][PATCH] btrfs: Add qgroup tracing

2016-03-31 Thread David Sterba
On Tue, Mar 29, 2016 at 05:19:55PM -0700, Mark Fasheh wrote: > This patch adds tracepoints to the qgroup code on both the reporting side > (insert_dirty_extents) and the accounting side. Taken together it allows us > to see what qgroup operations have happened, and what their result was. > > Signe

Re: [PATCH] Btrfs: don't use src fd for printk

2016-03-31 Thread David Sterba
On Fri, Mar 25, 2016 at 10:02:41AM -0400, Josef Bacik wrote: > The fd we pass in may not be on a btrfs file system, so don't try to do > BTRFS_I() on it. Thanks, > > Signed-off-by: Josef Bacik Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" i

Re: [PATCH] btrfs-progs: fsck: Fix a false metadata extent warning

2016-03-31 Thread David Sterba
On Thu, Mar 31, 2016 at 10:19:34AM +0800, Qu Wenruo wrote: > At least 2 user from mail list reported btrfsck reported false alert of > "bad metadata [,) crossing stripe boundary". > > While the reported number are all inside the same 64K boundary. > After some check, all the false alert ha

Re: [PATCH v9 00/19] Btrfs dedupe framework

2016-03-31 Thread David Sterba
On Wed, Mar 30, 2016 at 03:55:55PM +0800, Qu Wenruo wrote: > This March 30th patchset update mostly addresses the patchset structure > comment from David: > 1) Change the patchset sequence >Not If only apply the first 14 patches, it can provide the full >backward compatible in-memory only d

Re: fallocate mode flag for "unshare blocks"?

2016-03-31 Thread Austin S. Hemmelgarn
On 2016-03-31 11:31, Andreas Dilger wrote: On Mar 31, 2016, at 1:55 AM, Christoph Hellwig wrote: On Wed, Mar 30, 2016 at 05:32:42PM -0700, Liu Bo wrote: Well, btrfs fallocate doesn't allocate space if it's a shared one because it thinks the space is already allocated. So a later overwrite ov

Re: fallocate mode flag for "unshare blocks"?

2016-03-31 Thread Andreas Dilger
On Mar 31, 2016, at 1:55 AM, Christoph Hellwig wrote: > > On Wed, Mar 30, 2016 at 05:32:42PM -0700, Liu Bo wrote: >> Well, btrfs fallocate doesn't allocate space if it's a shared one >> because it thinks the space is already allocated. So a later overwrite >> over this shared extent may hit enos

Btrfs progs release 4.5.1

2016-03-31 Thread David Sterba
Hi, btrfs-progs 4.5.1 have been released. A bugfix release, several build fixes, a few minor fixes, improvements or preparatory work that do not need to be delayed. There's one user visible change: * mkfs: allow DUP on multi-device filesystem Tarballs: https://www.kernel.org/pub/linux/kernel/p

Re: [PATCH] btrfs-progs: fix unknown type name 'u64' in gccgo

2016-03-31 Thread David Sterba
On Tue, Mar 29, 2016 at 03:34:48PM -0600, Julio Montes wrote: > From: Julio Montes > > Signed-off-by: Julio Montes Applied, thanks. -- 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

Re: [PATCH V15 00/15] Btrfs: Subpagesize-blocksize: Allow I/O on blocks whose size is less than page size

2016-03-31 Thread David Sterba
On Thu, Mar 31, 2016 at 11:31:06AM +0200, David Sterba wrote: > On Tue, Mar 22, 2016 at 06:50:32PM +0530, Chandan Rajendra wrote: > > On Tuesday 22 Mar 2016 12:04:23 David Sterba wrote: > > > On Thu, Feb 11, 2016 at 11:17:38PM +0530, Chandan Rajendra wrote: > > > > this patchset temporarily disable

Re: How to cancel btrfs balance on unmounted filesystem

2016-03-31 Thread Marc Haber
On Thu, Mar 31, 2016 at 01:01:37PM +0500, Roman Mamedov wrote: > On Thu, 31 Mar 2016 08:21:12 +0200 > Marc Haber wrote: > > the balance restarts immediately after mounting > > You can use the skip_balance mount option to prevent that. Thanks. I now have this in all fstabs. On the system in quest

Re: fallocate mode flag for "unshare blocks"?

2016-03-31 Thread Austin S. Hemmelgarn
On 2016-03-31 07:18, Austin S. Hemmelgarn wrote: On 2016-03-30 20:32, Liu Bo wrote: On Wed, Mar 30, 2016 at 11:27:55AM -0700, Darrick J. Wong wrote: Hi all, Christoph and I have been working on adding reflink and CoW support to XFS recently. Since the purpose of (mode 0) fallocate is to make

Re: fallocate mode flag for "unshare blocks"?

2016-03-31 Thread Austin S. Hemmelgarn
On 2016-03-30 20:32, Liu Bo wrote: On Wed, Mar 30, 2016 at 11:27:55AM -0700, Darrick J. Wong wrote: Hi all, Christoph and I have been working on adding reflink and CoW support to XFS recently. Since the purpose of (mode 0) fallocate is to make sure that future file writes cannot ENOSPC, I exte

Re: fallocate mode flag for "unshare blocks"?

2016-03-31 Thread Dave Chinner
On Thu, Mar 31, 2016 at 12:54:40AM -0700, Christoph Hellwig wrote: > On Thu, Mar 31, 2016 at 12:18:13PM +1100, Dave Chinner wrote: > > On Wed, Mar 30, 2016 at 11:27:55AM -0700, Darrick J. Wong wrote: > > > Or is it ok that fallocate could block, potentially for a long time as > > > we stream cows t

Re: fallocate mode flag for "unshare blocks"?

2016-03-31 Thread Austin S. Hemmelgarn
On 2016-03-31 03:58, Christoph Hellwig wrote: On Wed, Mar 30, 2016 at 02:58:38PM -0400, Austin S. Hemmelgarn wrote: Nothing that I can find in the man-pages or API documentation for Linux's fallocate explicitly says that it will be fast. There are bits that say it should be efficient, but that

[GIT PULL] Btrfs file/data loss bug fix

2016-03-31 Thread fdmanana
From: Filipe Manana Hi Chris, Please consider the following fix for the linux kernel 4.6 release. It is not a regression in the code for 4.6 nor introduced in any recent release, it's a problem that's been around for a long time (years). But since it's a quite serious one, it's important in my o

[PATCH v2] Btrfs: fix file/data loss caused by fsync after rename and new inode

2016-03-31 Thread fdmanana
From: Filipe Manana If we rename an inode A (be it a file or a directory), create a new inode B with the old name of inode A and under the same parent directory, fsync inode B and then power fail, at log tree replay time we end up removing inode A completely. If inode A is a directory then all it

Re: [PATCH V15 00/15] Btrfs: Subpagesize-blocksize: Allow I/O on blocks whose size is less than page size

2016-03-31 Thread David Sterba
On Tue, Mar 22, 2016 at 06:50:32PM +0530, Chandan Rajendra wrote: > On Tuesday 22 Mar 2016 12:04:23 David Sterba wrote: > > On Thu, Feb 11, 2016 at 11:17:38PM +0530, Chandan Rajendra wrote: > > > this patchset temporarily disables the commit > > > f82c458a2c3ffb94b431fc6ad791a79df1b3713e. > > > >

Re: How to cancel btrfs balance on unmounted filesystem

2016-03-31 Thread Dmitrii Tcvetkov
Hello. There is no tool to disable balance on unmounted filesystem. But you can use mount option skip_balance for this. Original Message From: Marc Haber Sent: March 31, 2016 9:21:12 AM GMT+03:00 To: linux-btrfs@vger.kernel.org Subject: How to cancel btrfs balance on unmounted

Re: How to cancel btrfs balance on unmounted filesystem

2016-03-31 Thread Roman Mamedov
On Thu, 31 Mar 2016 08:21:12 +0200 Marc Haber wrote: > the balance restarts immediately after mounting You can use the skip_balance mount option to prevent that. -- With respect, Roman pgpGkbeeS9Inh.pgp Description: OpenPGP digital signature

Re: fallocate mode flag for "unshare blocks"?

2016-03-31 Thread Christoph Hellwig
On Wed, Mar 30, 2016 at 02:58:38PM -0400, Austin S. Hemmelgarn wrote: > Nothing that I can find in the man-pages or API documentation for Linux's > fallocate explicitly says that it will be fast. There are bits that say it > should be efficient, but that is not itself well defined (given context,

Re: fallocate mode flag for "unshare blocks"?

2016-03-31 Thread Christoph Hellwig
On Wed, Mar 30, 2016 at 05:32:42PM -0700, Liu Bo wrote: > Well, btrfs fallocate doesn't allocate space if it's a shared one > because it thinks the space is already allocated. So a later overwrite > over this shared extent may hit enospc errors. And this makes it an incorrect implementation of po

Re: fallocate mode flag for "unshare blocks"?

2016-03-31 Thread Christoph Hellwig
On Thu, Mar 31, 2016 at 12:18:13PM +1100, Dave Chinner wrote: > On Wed, Mar 30, 2016 at 11:27:55AM -0700, Darrick J. Wong wrote: > > Or is it ok that fallocate could block, potentially for a long time as > > we stream cows through the page cache (or however unshare works > > internally)? Those sam