All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liu Bo <bo.li.liu@oracle.com>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>
Cc: David Sterba <dsterba@suse.cz>, linux-btrfs@vger.kernel.org
Subject: Re: [GIT PULL] btrfs fixes and cleanups
Date: Thu, 12 Jan 2017 08:10:27 -0800	[thread overview]
Message-ID: <20170112161027.GA24433@localhost.localdomain> (raw)
In-Reply-To: <04f553db-e164-8f52-7ece-885faa34ee9c@cn.fujitsu.com>

Hi,

On Wed, Dec 28, 2016 at 05:30:59PM +0800, Qu Wenruo wrote:
> Hi Liu,
> 
> At 12/15/2016 03:13 PM, Liu Bo wrote:
> > Hi David,
> > 
> > This is the collection of my patches targetting 4.10, I've
> > dropped patch "Btrfs: adjust len of writes if following a
> > preallocated extent" because of the deadlock caused by this
> > commit.
> > 
> > Patches are based on v4.9-rc8, and test against fstests with
> > default mount options has been taken to make sure it doesn't
> > break anything.
> > 
> > I haven't got a kernel.org git repo, so this is mainly for
> > tracking purpose and for testing git flow.
> > 
> > (cherry-pick patches might be the only way at this moment...sorry
> > for the inconvenience.)
> > 
> > Anyway, patches can be found at
> > 
> > 	https://github.com/liubogithub/btrfs-work.git for-dave
> > 
> > Thanks,
> > liubo
> > 
> > Liu Bo (9):
> >   Btrfs: add 'inode' for extent map tracepoint
> >   Btrfs: add truncated_len for ordered extent tracepoints
> >   Btrfs: use down_read_nested to make lockdep silent
> >   Btrfs: fix lockdep warning about log_mutex
> >   Btrfs: fix truncate down when no_holes feature is enabled
> >   Btrfs: fix btrfs_ordered_update_i_size to update disk_i_size properly
> >   Btrfs: fix comment in btrfs_page_mkwrite
> >   Btrfs: clean up btrfs_ordered_update_i_size
> 
> While testing David's for-next-20161219 branch, I found btrfs/06[0-5] will
> cause the following kernel panic when ran them in a row.
> 
> [ 4207.963063] assertion failed: disk_i_size < i_size, file:
> fs/btrfs//ordered-data.c, line: 1041
> [ 4207.963722] ------------[ cut here ]------------
> [ 4207.964008] kernel BUG at fs/btrfs//ctree.h:3418!
> [ 4207.964008] invalid opcode: 0000 [#1] SMP
> [ 4207.964008] Modules linked in: btrfs(O) netconsole ext4 jbd2 mbcache xor
> zlib_deflate raid6_pq xfs [last unloaded: btrfs]
> [ 4207.964008] CPU: 0 PID: 3829 Comm: kworker/u4:5 Tainted: G O    4.9.0+
> #60
> [ 4207.964008] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS
> 1.10.1-20161122_114906-anatol 04/01/2014
> [ 4207.964008] Workqueue: btrfs-endio-write btrfs_endio_write_helper [btrfs]
> [ 4207.964008] task: ffff88000bbf8040 task.stack: ffffc90006598000
> [ 4207.964008] RIP: 0010:[<ffffffffa0462245>]  [<ffffffffa0462245>]
> assfail.constprop.10+0x1c/0x1e [btrfs]
> <snip>
> [ 4207.964008] Call Trace:
> [ 4207.964008]  [<ffffffffa03f1f41>] btrfs_ordered_update_i_size+0x2b1/0x2e0
> [btrfs]
> [ 4207.964008]  [<ffffffffa03dd435>] btrfs_finish_ordered_io+0x335/0x6b0
> [btrfs]
> [ 4207.964008]  [<ffffffffa03dd7c5>] finish_ordered_fn+0x15/0x20 [btrfs]
> [ 4207.964008]  [<ffffffffa040961f>] btrfs_scrubparity_helper+0xef/0x610
> [btrfs]
> [ 4207.964008]  [<ffffffffa0409bce>] btrfs_endio_write_helper+0xe/0x10
> [btrfs]
> [ 4207.964008]  [<ffffffff810ec9ef>] process_one_work+0x2af/0x720
> [ 4207.964008]  [<ffffffff810ec96b>] ? process_one_work+0x22b/0x720
> [ 4207.964008]  [<ffffffff810eceab>] worker_thread+0x4b/0x4f0
> [ 4207.964008]  [<ffffffff810ece60>] ? process_one_work+0x720/0x720
> [ 4207.964008]  [<ffffffff810ece60>] ? process_one_work+0x720/0x720
> [ 4207.964008]  [<ffffffff810f3d93>] kthread+0xf3/0x110
> [ 4207.964008]  [<ffffffff810f3ca0>] ? kthread_park+0x60/0x60
> [ 4207.964008]  [<ffffffff818af7c7>] ret_from_fork+0x27/0x40
> [ 4207.964008] Code: c7 00 e4 46 a0 48 89 e5 e8 c8 3c d8 e0 0f 0b 55 89 f1
> 48 c7 c2 83 90 46 a0 48 89 fe 48 c7 c7 b0 e4 46 a0 48 89 e5 e8 aa 3c d8 e0
> <0f> 0b 55 89 f1 48 c7 c2 fb 90 46 a0 48 89 fe 48 c7 c7 e8 e5 46
> [ 4207.964008] RIP  [<ffffffffa0462245>] assfail.constprop.10+0x1c/0x1e
> [btrfs]
> [ 4207.964008]  RSP <ffffc9000659bc18>
> [ 4207.964008] ---[ end trace f7759d2fce14da9f ]---
> 
> Not sure if it's related to patch or just it exposed some bug we don't find
> before.
> 
> Hopes it will help.
>

Thanks for spotting it, just found out that this ASSERT is not true any
more after patch "Btrfs: fix btrfs_ordered_update_i_size to update
disk_i_size properly".

I'm doing a v2 to remove it.

Thanks,

-liubo
 
> Thanks,
> Qu
> 
> >   Btrfs: fix another race between truncate and lockless dio write
> > 
> >  fs/btrfs/extent-tree.c       |  3 ++-
> >  fs/btrfs/inode.c             | 43 +++++++++++++++++++++++++++++++++++--------
> >  fs/btrfs/ordered-data.c      | 42 ++++++++++++++++++++++++------------------
> >  fs/btrfs/tree-log.c          | 13 ++++++++++---
> >  include/trace/events/btrfs.h | 16 ++++++++++++----
> >  5 files changed, 83 insertions(+), 34 deletions(-)
> > 
> 
> 

  reply	other threads:[~2017-01-12 16:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-15  7:13 [GIT PULL] btrfs fixes and cleanups Liu Bo
2016-12-20 16:20 ` David Sterba
2016-12-28  9:30 ` Qu Wenruo
2017-01-12 16:10   ` Liu Bo [this message]
2017-01-13  0:46     ` Qu Wenruo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170112161027.GA24433@localhost.localdomain \
    --to=bo.li.liu@oracle.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.