Re: [PATCH] fstests: add test for btrfs send/receive with sparse files

2017-03-20 Thread Qu Wenruo
Hi Filipe, At 02/15/2017 04:35 AM, fdman...@kernel.org wrote: From: Filipe Manana Test that both a full and incremental btrfs send operation preserves file holes. I found the test case fails with compress=lzo mount option. In fact, it turns out to be 2 bugs: [Inline-then-regular layout] An

Re: [PATCH v2 0/3] Btrfs in-band de-duplication test cases

2017-03-20 Thread Eryu Guan
On Tue, Mar 21, 2017 at 01:22:33PM +0800, Qu Wenruo wrote: > > > At 03/21/2017 12:51 PM, Eryu Guan wrote: > > Hi Qu, > > > > On Thu, Mar 16, 2017 at 05:08:48PM +0800, Qu Wenruo wrote: > > > Btrfs in-band de-duplication test cases for in-memory backend, which > > > covers > > > the bugs exposed

Re: [PATCH v2 0/3] Btrfs in-band de-duplication test cases

2017-03-20 Thread Qu Wenruo
At 03/21/2017 12:51 PM, Eryu Guan wrote: Hi Qu, On Thu, Mar 16, 2017 at 05:08:48PM +0800, Qu Wenruo wrote: Btrfs in-band de-duplication test cases for in-memory backend, which covers the bugs exposed during the development. Do you have a kernel tree that contains the in-band patches so that

Re: [PATCH v2 0/3] Btrfs in-band de-duplication test cases

2017-03-20 Thread Eryu Guan
Hi Qu, On Thu, Mar 16, 2017 at 05:08:48PM +0800, Qu Wenruo wrote: > Btrfs in-band de-duplication test cases for in-memory backend, which covers > the bugs exposed during the development. Do you have a kernel tree that contains the in-band patches so that I and others could try and run these tests

Re: [PATCH 4/5] btrfs: raid56: Don't keep rbio for later steal

2017-03-20 Thread Qu Wenruo
At 03/21/2017 10:08 AM, Liu Bo wrote: On Tue, Mar 21, 2017 at 08:44:18AM +0800, Qu Wenruo wrote: At 03/21/2017 04:23 AM, Liu Bo wrote: On Mon, Mar 20, 2017 at 02:21:48PM +0800, Qu Wenruo wrote: At 03/18/2017 10:03 AM, Liu Bo wrote: On Fri, Mar 17, 2017 at 01:28:45PM +0800, Qu Wenruo wro

Re: [PATCH 4/5] btrfs: raid56: Don't keep rbio for later steal

2017-03-20 Thread Liu Bo
On Tue, Mar 21, 2017 at 08:44:18AM +0800, Qu Wenruo wrote: > > > At 03/21/2017 04:23 AM, Liu Bo wrote: > > On Mon, Mar 20, 2017 at 02:21:48PM +0800, Qu Wenruo wrote: > > > > > > > > > At 03/18/2017 10:03 AM, Liu Bo wrote: > > > > On Fri, Mar 17, 2017 at 01:28:45PM +0800, Qu Wenruo wrote: > > >

[PATCH] fix inconsistent device between /proc/pid/maps and stat

2017-03-20 Thread Satoru Takeuchi
There have been some discussions about inconsistent device between /proc/pid/maps and stat(2). http://thr3ads.net/btrfs-devel/2011/05/2346176-RFC-PATCH-0-2-btrfs-vfs-Return-same-device-in-stat-2-and-proc-pid-maps https://www.spinics.net/lists/linux-btrfs/msg09044.html https://patchwork.kernel.org

[PATCH] btrfs-progs: convert: Add missing return for HOLE mode when checking convert image

2017-03-20 Thread Qu Wenruo
In check_convert_image(), for normal HOLE case, if the file extents are smaller than image size, we set ret to -EINVAL and print error message. But forget to return. This patch adds the missing return to fix it. Signed-off-by: Qu Wenruo --- convert/main.c | 1 + 1 file changed, 1 insertion(+)

Re: [PATCH 4/5] btrfs: raid56: Don't keep rbio for later steal

2017-03-20 Thread Qu Wenruo
At 03/21/2017 04:23 AM, Liu Bo wrote: On Mon, Mar 20, 2017 at 02:21:48PM +0800, Qu Wenruo wrote: At 03/18/2017 10:03 AM, Liu Bo wrote: On Fri, Mar 17, 2017 at 01:28:45PM +0800, Qu Wenruo wrote: At 03/17/2017 12:44 PM, Liu Bo wrote: On Fri, Feb 03, 2017 at 04:20:22PM +0800, Qu Wenruo wro

Re: [PATCH 6/7] btrfs: remove redundant parameter from reada_start_machine_dev

2017-03-20 Thread Liu Bo
On Wed, Mar 15, 2017 at 05:02:39PM +0100, David Sterba wrote: > We can read fs_info from dev. > Reviewed-by: Liu Bo Thanks, -liubo > Signed-off-by: David Sterba > --- > fs/btrfs/reada.c | 7 +++ > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/fs/btrfs/reada.c b/fs/btrf

Re: [RFC PATCH v1 00/30] fs: inode->i_version rework and optimization

2017-03-20 Thread J. Bruce Fields
On Thu, Dec 22, 2016 at 09:42:04AM -0500, Jeff Layton wrote: > On Thu, 2016-12-22 at 00:45 -0800, Christoph Hellwig wrote: > > On Wed, Dec 21, 2016 at 12:03:17PM -0500, Jeff Layton wrote: > > > > > > Only btrfs, ext4, and xfs implement it for data changes. Because of > > > this, these filesystems

Re: [PATCH 5/7] btrfs: remove redundant parameter from reada_find_zone

2017-03-20 Thread Liu Bo
On Wed, Mar 15, 2017 at 05:02:36PM +0100, David Sterba wrote: > We can read fs_info from dev. > Reviewed-by: Liu Bo Thanks, -liubo > Signed-off-by: David Sterba > --- > fs/btrfs/reada.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/fs/btrfs/reada.c b/fs/btrfs

Re: [PATCH 7/7] btrfs: remove local blocksize variable in reada_find_extent

2017-03-20 Thread Liu Bo
On Wed, Mar 15, 2017 at 05:02:42PM +0100, David Sterba wrote: > The name is misleading and the local variable serves no purpose. Reviewed-by: Liu Bo Thanks, -liubo > > Signed-off-by: David Sterba > --- > fs/btrfs/reada.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff

Re: [PATCH 4/7] btrfs: remove redundant parameter from btree_readahead_hook

2017-03-20 Thread Liu Bo
On Wed, Mar 15, 2017 at 05:02:33PM +0100, David Sterba wrote: > We can read fs_info from eb. Reviewed-by: Liu Bo Thanks, -liubo > > Signed-off-by: David Sterba > --- > fs/btrfs/ctree.h | 3 +-- > fs/btrfs/disk-io.c | 4 ++-- > fs/btrfs/reada.c | 4 ++-- > 3 files changed, 5 insertions(+),

Re: [PATCH 3/7] btrfs: preallocate radix tree node for global readahead tree

2017-03-20 Thread Liu Bo
On Wed, Mar 15, 2017 at 05:02:30PM +0100, David Sterba wrote: > We can preallocate the node so insertion does not have to do that under > the lock. The GFP flags for the global radix tree are initialized to > GFP_NOFS & ~__GFP_DIRECT_RECLAIM > but we can use GFP_KERNEL, because readahead is option

Re: [PATCH 2/7] btrfs: use simpler readahead zone lookups

2017-03-20 Thread Liu Bo
On Wed, Mar 15, 2017 at 05:02:26PM +0100, David Sterba wrote: > No point using radix_tree_gang_lookup if we're looking up just one slot. > Reviewed-by: Liu Bo Thanks, -liubo > Signed-off-by: David Sterba > --- > fs/btrfs/reada.c | 52 ++-- > 1 f

Re: [PATCH 1/7] btrfs: preallocate radix tree node for readahead

2017-03-20 Thread Liu Bo
On Wed, Mar 15, 2017 at 05:02:23PM +0100, David Sterba wrote: > We can preallocate the node so insertion does not have to do that under > the lock. The GFP flags for the per-device radix tree are initialized to > GFP_NOFS & ~__GFP_DIRECT_RECLAIM > but we can use GFP_KERNEL, same as an allocation a

Re: [PATCH 4/5] btrfs: raid56: Don't keep rbio for later steal

2017-03-20 Thread Liu Bo
On Mon, Mar 20, 2017 at 02:21:48PM +0800, Qu Wenruo wrote: > > > At 03/18/2017 10:03 AM, Liu Bo wrote: > > On Fri, Mar 17, 2017 at 01:28:45PM +0800, Qu Wenruo wrote: > > > > > > > > > At 03/17/2017 12:44 PM, Liu Bo wrote: > > > > On Fri, Feb 03, 2017 at 04:20:22PM +0800, Qu Wenruo wrote: > > >

Re: [PATCH 5/5] btrfs: replace: Use ref counts to avoid destroying target device when canceled

2017-03-20 Thread Liu Bo
On Mon, Mar 20, 2017 at 02:30:48PM +0800, Qu Wenruo wrote: > > > At 03/18/2017 10:12 AM, Liu Bo wrote: > > On Fri, Feb 03, 2017 at 04:20:23PM +0800, Qu Wenruo wrote: > > > When dev-replace and scrub are run at the same time, dev-replace can be > > > canceled by scrub. It's quite common for btrfs/

Re: include linux kernel headers for btrfs filesystem

2017-03-20 Thread Alex Lyakas
Ilan, On Mon, Mar 20, 2017 at 10:33 AM, Ilan Schwarts wrote: > I need to cast struct inode to struct btrfs_inode. > in order to do it, i looked at implementation of btrfs_getattr. > > the code is simple: > struct btrfs_inode *btrfsInode; > btrfsInode = BTRFS_I(inode); > > in order to compile i mu

Re: [PATCH 5/8] nowait aio: return on congested block device

2017-03-20 Thread Jan Kara
On Fri 17-03-17 07:23:24, Goldwyn Rodrigues wrote: > On 03/16/2017 04:31 PM, Dave Chinner wrote: > > On Wed, Mar 15, 2017 at 04:51:04PM -0500, Goldwyn Rodrigues wrote: > >> From: Goldwyn Rodrigues > >> > >> A new flag BIO_NOWAIT is introduced to identify bio's > >> orignating from iocb with IOCB_N

include linux kernel headers for btrfs filesystem

2017-03-20 Thread Ilan Schwarts
I need to cast struct inode to struct btrfs_inode. in order to do it, i looked at implementation of btrfs_getattr. the code is simple: struct btrfs_inode *btrfsInode; btrfsInode = BTRFS_I(inode); in order to compile i must add the headers on top of the function: #include "/data/kernel/linux-4.1.2