linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josef Bacik <jbacik@fusionio.com>
To: <dsterba@suse.cz>, Tomasz Chmielewski <mangoo@wpkg.org>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: btrfs: qgroup scan failed with -12
Date: Mon, 23 Sep 2013 13:43:48 -0400	[thread overview]
Message-ID: <20130923174348.GC18681@localhost.localdomain> (raw)
In-Reply-To: <20130923171905.GR6810@twin.jikos.cz>

On Mon, Sep 23, 2013 at 07:19:06PM +0200, David Sterba wrote:
> On Mon, Sep 23, 2013 at 07:43:44AM +0700, Tomasz Chmielewski wrote:
> > Not sure if it's anything interesting - I had the following entry in
> > dmesg a few days ago, on a server with 32 GB RAM. The system is still working fine.
> 
> Yes this is interesting of course.
> > 
> > [1878432.675210] btrfs-qgroup-re: page allocation failure: order:5, mode:0x104050
> 
> Order 5 allocation, not guaranteed to succeed.
> 
> > [1878432.675319] CPU: 5 PID: 22251 Comm: btrfs-qgroup-re Not tainted 3.11.0-rc7 #2
> > [1878432.676204]  [<ffffffff810bde12>] krealloc+0x52/0x8c
> > [1878432.676324]  [<ffffffffa036bcf0>] find_parent_nodes+0x49c/0x5a5 [btrfs]
> > [1878432.676383]  [<ffffffffa036be75>] btrfs_find_all_roots+0x7c/0xd7 [btrfs]
> > [1878432.676441]  [<ffffffffa036d6e1>] ? qgroup_account_ref_step1+0xea/0x102 [btrfs]
> > [1878432.676542]  [<ffffffffa036d915>] btrfs_qgroup_rescan_worker+0x21c/0x516 [btrfs]
> 
> 220                 new_nodes = krealloc(old, sizeof(*new_nodes) * new_alloced,
> 221                                      gfp_mask);
> 222                 if (!new_nodes)
> 223                         return -ENOMEM;
> 
> The requested size is between 64k and 128k, with 40 bytes of ulist_node
> it's 1638 to 3276 elements. So, lots of things going on during the
> rescan, quite expectable.
> 
> I don't know if krealloc can be replaced with something more friendly to
> allocator, eg. a list of page-sized blocks instead of one contiguous
> array.
> 

I've done that with a patch in bugzilla, hopefully that will fix it.  I've not
had time to try and reproduce myself, but I assume if you do something like
create a random file, then create 100000 snapshots and then defrag it will
probably hit the same problem.  Thanks,

Josef

  reply	other threads:[~2013-09-23 17:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-23  0:43 btrfs: qgroup scan failed with -12 Tomasz Chmielewski
2013-09-23 13:00 ` Wang Shilong
2013-09-23 14:57 ` Josef Bacik
2013-09-23 17:19 ` David Sterba
2013-09-23 17:43   ` Josef Bacik [this message]
2013-09-25 10:11     ` David Sterba
2013-09-25 11:30       ` Tomasz Chmielewski

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=20130923174348.GC18681@localhost.localdomain \
    --to=jbacik@fusionio.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=mangoo@wpkg.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;
as well as URLs for NNTP newsgroup(s).