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

2017-03-09 Thread Zygo Blaxell
On Thu, Mar 09, 2017 at 10:39:49AM -0500, Chris Mason wrote: > > > On 03/08/2017 09:12 PM, Zygo Blaxell wrote: > >This is a story about 4 distinct (and very old) btrfs bugs. > > > > Really great write up. > > [ ... ] > > > > >diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c > >index

Re: [PATCH v2] btrfs: fix a bogus warning when converting only data or metadata

2017-03-09 Thread Adam Borowski
On Thu, Mar 09, 2017 at 02:43:27PM +0100, David Sterba wrote: > The patch does not apply to current master, there's > > 3861 if (bctl->sys.flags & BTRFS_BALANCE_ARGS_CONVERT) { > 3862 fs_info->num_tolerated_disk_barrier_failures = min( > 3863

Re: [PATCH v2 0/9] convert: rework rollback

2017-03-09 Thread David Sterba
On Fri, Feb 24, 2017 at 01:52:23PM +0800, Qu Wenruo wrote: > The patchset can be fetched from my github, based on v4.9.1: > https://github.com/adam900710/btrfs-progs/tree/rollback_rework_v2 I have manually merged the patchset and made some minor change along the way. The convert tests now pass,

Re: [PATCH] Btrfs: add file item tracepoint

2017-03-09 Thread Liu Bo
On Thu, Mar 09, 2017 at 01:52:22PM +0100, David Sterba wrote: > On Tue, Mar 07, 2017 at 08:49:42AM -0800, Liu Bo wrote: > > On Tue, Mar 07, 2017 at 04:48:24PM +0100, David Sterba wrote: > > > On Fri, Mar 03, 2017 at 06:41:27PM -0800, Liu Bo wrote: > > > > + TP_printk_btrfs( > > > > +

Re: [PATCH v7 1/2] btrfs: Fix metadata underflow caused by btrfs_reloc_clone_csum error

2017-03-09 Thread Liu Bo
On Wed, Mar 08, 2017 at 10:25:51AM +0800, Qu Wenruo wrote: > [BUG] > When btrfs_reloc_clone_csum() reports error, it can underflow metadata > and leads to kernel assertion on outstanding extents in > run_delalloc_nocow() and cow_file_range(). > > BTRFS info (device vdb5): relocating block group

Re: [PATCH v7 2/2] btrfs: Handle delalloc error correctly to avoid ordered extent hang

2017-03-09 Thread Liu Bo
On Wed, Mar 08, 2017 at 10:25:52AM +0800, Qu Wenruo wrote: > [BUG] > If run_delalloc_range() returns error and there is already some ordered > extents created, btrfs will be hanged with the following backtrace: > > Call Trace: > __schedule+0x2d4/0xae0 > schedule+0x3d/0x90 >

Re: assertion failed: last_size == new_size, file: fs/btrfs/inode.c

2017-03-09 Thread Liu Bo
On Thu, Mar 09, 2017 at 03:24:21PM +0100, David Sterba wrote: > On Thu, Mar 02, 2017 at 06:04:33PM -0800, Liu Bo wrote: > > On Thu, Mar 02, 2017 at 07:58:01AM -0800, Liu Bo wrote: > > > On Wed, Mar 01, 2017 at 03:03:19PM -0500, Dave Jones wrote: > > > > On Tue, Feb 28, 2017 at 05:12:01PM -0800,

Re: [PATCH] qgroup: Retry after commit on getting EDQUOT

2017-03-09 Thread David Sterba
On Sun, Feb 19, 2017 at 07:30:59AM -0600, Goldwyn Rodrigues wrote: > From: Goldwyn Rodrigues > > We are facing the same problem with EDQUOT which was experienced with > ENOSPC. Not sure if we require a full ticketing system such as ENOSPC, but > here is a fix. Let me know if

Re: [PATCH 00/17] fs, btrfs refcount conversions

2017-03-09 Thread David Sterba
On Fri, Mar 03, 2017 at 10:55:09AM +0200, Elena Reshetova wrote: > Now when new refcount_t type and API are finally merged > (see include/linux/refcount.h), the following > patches convert various refcounters in the btrfs filesystem from atomic_t > to refcount_t. By doing this we prevent

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

2017-03-09 Thread Chris Mason
On 03/08/2017 09:12 PM, Zygo Blaxell wrote: This is a story about 4 distinct (and very old) btrfs bugs. Really great write up. [ ... ] diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 25ac2cf..4d41a31 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -6805,6 +6805,12 @@

Re: [PATCH 00/17] fs, btrfs refcount conversions

2017-03-09 Thread David Sterba
On Tue, Mar 07, 2017 at 03:49:52PM +0800, Qu Wenruo wrote: > >>> If the patches pass all tests on your side, could you please take them in > >>> and > >> propagate further? > >>> I will continue with other kernel subsystems. > >> > >> The patchset itself looks like a common cleanup, while I did

Re: assertion failed: last_size == new_size, file: fs/btrfs/inode.c

2017-03-09 Thread David Sterba
On Thu, Mar 02, 2017 at 06:04:33PM -0800, Liu Bo wrote: > On Thu, Mar 02, 2017 at 07:58:01AM -0800, Liu Bo wrote: > > On Wed, Mar 01, 2017 at 03:03:19PM -0500, Dave Jones wrote: > > > On Tue, Feb 28, 2017 at 05:12:01PM -0800, Liu Bo wrote: > > > > On Mon, Feb 27, 2017 at 11:23:42AM -0500, Dave

[PULL] Btrfs updates for 4.11-rc2

2017-03-09 Thread David Sterba
Hi, there's a regression fix for the assertion failure reported by Dave Jones, the rest of patches are minor updates. Please pull, thanks. The following changes since commit e9f467d028cd7d8bee2a4d6c4fb806caf8cd580b: Merge branch 'for-chris-4.11-part2' of

Re: raid1 degraded mount still produce single chunks, writeable mount not allowed

2017-03-09 Thread Austin S. Hemmelgarn
On 2017-03-09 04:49, Peter Grandi wrote: Consider the common case of a 3-member volume with a 'raid1' target profile: if the sysadm thinks that a drive should be replaced, the goal is to take it out *without* converting every chunk to 'single', because with 2-out-of-3 devices half of the chunks

Re: [PATCH v2] btrfs: fix a bogus warning when converting only data or metadata

2017-03-09 Thread David Sterba
On Tue, Mar 07, 2017 at 11:34:44PM +0100, Adam Borowski wrote: > On Tue, Mar 07, 2017 at 12:34:07PM -0800, Liu Bo wrote: > > This looks good, but this also brings another side effect, @bctl would > > also be kept in balance_item which will be used to resume balance in > > case of crash, so it may

Re: [PATCH] Btrfs: add file item tracepoint

2017-03-09 Thread David Sterba
On Tue, Mar 07, 2017 at 08:49:42AM -0800, Liu Bo wrote: > On Tue, Mar 07, 2017 at 04:48:24PM +0100, David Sterba wrote: > > On Fri, Mar 03, 2017 at 06:41:27PM -0800, Liu Bo wrote: > > > + TP_printk_btrfs( > > > + "root %llu(%s) ino %llu sz 0x%llx disk_isz 0x%llx " > > > + "file

Re: [PATCH 1/2] Btrfs: remove unused delalloc_end parameter

2017-03-09 Thread David Sterba
On Tue, Mar 07, 2017 at 06:35:02PM +, Filipe Manana wrote: > On Tue, Mar 7, 2017 at 4:05 PM, David Sterba wrote: > > On Mon, Mar 06, 2017 at 11:32:47PM +, fdman...@kernel.org wrote: > >> From: Filipe Manana > >> > >> The delalloc_end parameter for

Re: [PATCH] Btrfs: consistent usage of types in balance_args

2017-03-09 Thread David Sterba
On Wed, Mar 08, 2017 at 06:58:43PM +0100, Hans van Kranenburg wrote: > The btrfs_balance_args are only used for the balance ioctl, so use __u > instead of __le here for consistency. The __le usage was introduced in > bc3094673f22d and dee32d0ac3719 and was probably a result of > copy/pasting when

Re: [PATCH 4/7] mm: introduce memalloc_nofs_{save,restore} API

2017-03-09 Thread David Sterba
On Tue, Mar 07, 2017 at 04:09:56PM +0100, Michal Hocko wrote: > On Mon 06-03-17 13:22:14, Andrew Morton wrote: > > On Mon, 6 Mar 2017 14:14:05 +0100 Michal Hocko wrote: > [...] > > > --- a/include/linux/gfp.h > > > +++ b/include/linux/gfp.h > > > @@ -210,8 +210,16 @@ struct

Re: raid1 degraded mount still produce single chunks, writeable mount not allowed

2017-03-09 Thread Peter Grandi
>> Consider the common case of a 3-member volume with a 'raid1' >> target profile: if the sysadm thinks that a drive should be >> replaced, the goal is to take it out *without* converting every >> chunk to 'single', because with 2-out-of-3 devices half of the >> chunks will still be fully