Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: liubo <liubo2009@cn.fujitsu.com>
To: Josef Bacik <josef@redhat.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: skip looking for delalloc if we don't have ->fill_delalloc
Date: Tue, 02 Aug 2011 09:32:29 +0800	[thread overview]
Message-ID: <4E3753AD.4010606@cn.fujitsu.com> (raw)
In-Reply-To: <1312215076-10329-1-git-send-email-josef@redhat.com>

On 08/02/2011 12:11 AM, Josef Bacik wrote:
> We always look for delalloc bytes in our io_tree so we can fill in delalloc.
> This is fine in most cases, but if we're writing out the btree_inode this is
> just a superfluous tree search on the io_tree, and if we have a lot of metadata
> dirty this could be an expensive check.  So instead check to see if our io_tree
> has a ->fill_delalloc op, and if not don't even bother doing the lookup.
> Thanks,
> 
> Signed-off-by: Josef Bacik <josef@redhat.com>
> ---

With the patch,

mkfs.btrfs /dev/sda15
mount /dev/sda15 /mnt/btrfs
dd if=/dev/zero of=/mnt/btrfs/tmp bs=1G

then it comes the following bug:

Btrfs loaded
device fsid 91d23288-d352-4346-979f-d6f93cac04a3 devid 1 transid 7 /dev/sda15
------------[ cut here ]------------
kernel BUG at fs/btrfs/inode.c:1583!
...
Call Trace:
 [<ffffffffa05b00d8>] worker_loop+0x138/0x510 [btrfs]
 [<ffffffffa05affa0>] ? btrfs_queue_worker+0x2d0/0x2d0 [btrfs]
 [<ffffffffa05affa0>] ? btrfs_queue_worker+0x2d0/0x2d0 [btrfs]
 [<ffffffff81074f06>] kthread+0x96/0xa0
 [<ffffffff81467bf4>] kernel_thread_helper+0x4/0x10
 [<ffffffff81074e70>] ? kthread_worker_fn+0x1a0/0x1a0
 [<ffffffff81467bf0>] ? gs_change+0xb/0xb
Code: e0 48 83 c4 28 5b 41 5c 41 5d 41 5e 41 5f c9 c3 48 8b 7d b8 48 8d 4d c8 41 b8 50 00 00 00 4c 89 fa 4c 89 e6 e8 19 cf 01 00 eb bd <0f> 0b eb fe 48 89 df e8 1b 48 b6 e0 eb 9d 66 0f 1f 84 00 00 00 
RIP  [<ffffffffa0587f59>] btrfs_writepage_fixup_worker+0x139/0x150 [btrfs]
 RSP <ffff88000887bdd0>
---[ end trace 5089b598ce74fcfc ]---

thanks,
liubo


  reply	other threads:[~2011-08-02  1:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-01 16:11 [PATCH] Btrfs: skip looking for delalloc if we don't have ->fill_delalloc Josef Bacik
2011-08-02  1:32 ` liubo [this message]
2011-08-02  1:43   ` liubo
2011-08-02 12:24     ` Josef Bacik

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=4E3753AD.4010606@cn.fujitsu.com \
    --to=liubo2009@cn.fujitsu.com \
    --cc=josef@redhat.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox