From: Josef Bacik <jbacik@fusionio.com>
To: Ahmet Inan <ainan@mathematik.uni-freiburg.de>
Cc: Josef Bacik <JBacik@fusionio.com>, Dave Jones <davej@redhat.com>,
Linux Kernel <linux-kernel@vger.kernel.org>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: btrfs crash when low on memory.
Date: Wed, 27 Feb 2013 13:26:17 -0500 [thread overview]
Message-ID: <20130227182617.GI19641@localhost.localdomain> (raw)
In-Reply-To: <CAFDW0jK6zigx0YgVMHomUkRQkqpw5mUgkdeynv36LUiQn4XTxg@mail.gmail.com>
On Wed, Feb 27, 2013 at 07:31:11AM -0700, Ahmet Inan wrote:
> > Yeah we have a lot of
> >
> > ptr = kmalloc();
> > BUG_ON(ptr);
> >
> > everywhere. I'll fix this one up but I really need to sit down and go through
> > all of them and make sure we do the right thing in all these places. Thanks,
>
> But what would be the right thing to do when you got no memory?
> Spinlock until you can kmalloc? Pre-reserve some memory?
>
Return ENOMEM? We have a way to abort transactions now, if it's in a horrible
of enough spot we can just abort the transaction and let the user deal with the
aftermath, it's nicer than panicing. Thanks,
Josef
next prev parent reply other threads:[~2013-02-27 18:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-27 5:22 btrfs crash when low on memory Dave Jones
2013-02-27 10:28 ` Martin Steigerwald
2013-02-27 13:27 ` Josef Bacik
2013-02-27 14:31 ` Ahmet Inan
2013-02-27 18:26 ` Josef Bacik [this message]
2013-02-27 20:10 ` Ahmet Inan
2013-02-27 21:11 ` Josef Bacik
2013-02-27 21:20 ` Ahmet Inan
2013-03-04 22:07 ` Martin Steigerwald
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=20130227182617.GI19641@localhost.localdomain \
--to=jbacik@fusionio.com \
--cc=ainan@mathematik.uni-freiburg.de \
--cc=davej@redhat.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@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