Re: [PATCH] btrfs: add missing memset while reading compressed inline extents

2017-03-21 Thread Qu Wenruo
At 03/09/2017 10:05 AM, Zygo Blaxell wrote: On Wed, Mar 08, 2017 at 10:27:33AM +, Filipe Manana wrote: On Wed, Mar 8, 2017 at 3:18 AM, Zygo Blaxell wrote: From: Zygo Blaxell This is a story about 4 distinct (and very old) btrfs bugs. Commit c8b978188c ("Btrfs: Add zlib compression sup

Re: [PATCH RFC] btrfs: introduce a separate mutex for caching_block_groups list

2017-03-21 Thread Liu Bo
On Sun, Mar 19, 2017 at 07:18:59PM +0200, Alex Lyakas wrote: > We have a commit_root_sem, which is a read-write semaphore that protects the > commit roots. > But it is also used to protect the list of caching block groups. > > As a result, while doing "slow" caching, the following issue is seen: >

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

2017-03-21 Thread Jeff Layton
On Tue, 2017-03-21 at 15:13 -0400, J. Bruce Fields wrote: > On Tue, Mar 21, 2017 at 02:46:53PM -0400, Jeff Layton wrote: > > On Tue, 2017-03-21 at 14:30 -0400, J. Bruce Fields wrote: > > > On Tue, Mar 21, 2017 at 01:23:24PM -0400, Jeff Layton wrote: > > > > On Tue, 2017-03-21 at 12:30 -0400, J. Bru

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

2017-03-21 Thread Dave Chinner
On Tue, Mar 21, 2017 at 01:23:24PM -0400, Jeff Layton wrote: > On Tue, 2017-03-21 at 12:30 -0400, J. Bruce Fields wrote: > > - It's durable; the above comparison still works if there were reboots > > between the two i_version checks. > > - I don't know how realistic this is--we may need to fi

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

2017-03-21 Thread J. Bruce Fields
On Tue, Mar 21, 2017 at 02:46:53PM -0400, Jeff Layton wrote: > On Tue, 2017-03-21 at 14:30 -0400, J. Bruce Fields wrote: > > On Tue, Mar 21, 2017 at 01:23:24PM -0400, Jeff Layton wrote: > > > On Tue, 2017-03-21 at 12:30 -0400, J. Bruce Fields wrote: > > > > - It's durable; the above comparison stil

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

2017-03-21 Thread J. Bruce Fields
On Tue, Mar 21, 2017 at 01:23:24PM -0400, Jeff Layton wrote: > On Tue, 2017-03-21 at 12:30 -0400, J. Bruce Fields wrote: > > - It's durable; the above comparison still works if there were reboots > > between the two i_version checks. > > - I don't know how realistic this is--we may need to fi

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

2017-03-21 Thread Jeff Layton
On Tue, 2017-03-21 at 14:30 -0400, J. Bruce Fields wrote: > On Tue, Mar 21, 2017 at 01:23:24PM -0400, Jeff Layton wrote: > > On Tue, 2017-03-21 at 12:30 -0400, J. Bruce Fields wrote: > > > - It's durable; the above comparison still works if there were reboots > > > between the two i_version check

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

2017-03-21 Thread J. Bruce Fields
On Tue, Mar 21, 2017 at 01:37:04PM -0400, J. Bruce Fields wrote: > On Tue, Mar 21, 2017 at 01:23:24PM -0400, Jeff Layton wrote: > > On Tue, 2017-03-21 at 12:30 -0400, J. Bruce Fields wrote: > > > - NFS doesn't actually require that it increases, but I think it > > > should. I assume 64 bits

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

2017-03-21 Thread J. Bruce Fields
On Tue, Mar 21, 2017 at 01:23:24PM -0400, Jeff Layton wrote: > On Tue, 2017-03-21 at 12:30 -0400, J. Bruce Fields wrote: > > - NFS doesn't actually require that it increases, but I think it > > should. I assume 64 bits means we don't need a discussion of > > wraparound. > > I thou

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

2017-03-21 Thread Jeff Layton
On Tue, 2017-03-21 at 12:30 -0400, J. Bruce Fields wrote: > On Tue, Mar 21, 2017 at 06:45:00AM -0700, Christoph Hellwig wrote: > > On Mon, Mar 20, 2017 at 05:43:27PM -0400, J. Bruce Fields wrote: > > > To me, the interesting question is whether this allows us to turn on > > > i_version updates by d

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

2017-03-21 Thread J. Bruce Fields
On Tue, Mar 21, 2017 at 06:45:00AM -0700, Christoph Hellwig wrote: > On Mon, Mar 20, 2017 at 05:43:27PM -0400, J. Bruce Fields wrote: > > To me, the interesting question is whether this allows us to turn on > > i_version updates by default on xfs and ext4. > > XFS v5 file systems have it on by def

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

2017-03-21 Thread Christoph Hellwig
On Mon, Mar 20, 2017 at 05:43:27PM -0400, J. Bruce Fields wrote: > To me, the interesting question is whether this allows us to turn on > i_version updates by default on xfs and ext4. XFS v5 file systems have it on by default. Although we'll still need to agree on the exact semantics of i_version

Re: [PATCH v2 3/3] fstests: btrfs: Test inband dedupe with data balance.

2017-03-21 Thread Eryu Guan
On Thu, Mar 16, 2017 at 05:08:51PM +0800, Qu Wenruo wrote: > Btrfs balance will reloate date extent, but its hash is removed too late ^^^ relocate > at run_delayed_ref() time, which will cause extent ref increased > during balance, cause either find_data_references() gives

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

2017-03-21 Thread Eryu Guan
On Tue, Mar 21, 2017 at 03:36:54PM +0800, Qu Wenruo wrote: > > > At 03/21/2017 03:23 PM, Eryu Guan wrote: > > On Thu, Mar 16, 2017 at 09:50:24AM +0800, Qu Wenruo wrote: > > > Btrfs in-band de-duplication test cases for in-memory backend, which > > > covers > > > the bugs exposed during the devel

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

2017-03-21 Thread Qu Wenruo
At 03/21/2017 03:23 PM, Eryu Guan wrote: On Thu, Mar 16, 2017 at 09:50:24AM +0800, Qu Wenruo wrote: Btrfs in-band de-duplication test cases for in-memory backend, which covers the bugs exposed during the development. Sorry, I'm having trouble enabling inband dedupe in tests, I always get ioc

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

2017-03-21 Thread Eryu Guan
On Thu, Mar 16, 2017 at 09:50:24AM +0800, Qu Wenruo wrote: > Btrfs in-band de-duplication test cases for in-memory backend, which covers > the bugs exposed during the development. Sorry, I'm having trouble enabling inband dedupe in tests, I always get ioctl failure, $seqres.full shows: btrfs-prog

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

2017-03-21 Thread Qu Wenruo
At 03/21/2017 02:05 PM, Eryu Guan wrote: 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 bu

Fwd: include linux kernel headers for btrfs filesystem

2017-03-21 Thread Ilan Schwarts
I read my question again, it was not perfectly clear, I am trying to compile my own driver and not the btrfs module. >From what I understand, it is considered "bad practice" in my driver to make a call: btrfsInode = BTRFS_I(inode); since it uses the internal btrfs API (in an outside driver such as

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

2017-03-21 Thread Liu Bo
On Tue, Mar 21, 2017 at 10:23:56AM +0800, Qu Wenruo wrote: > > > 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: > > >

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

2017-03-21 Thread Qu Wenruo
At 03/21/2017 01:45 PM, Liu Bo wrote: On Tue, Mar 21, 2017 at 10:23:56AM +0800, Qu Wenruo wrote: 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 wro