From: Eric Sandeen <sandeen@redhat.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: Mingming Cao <cmm@us.ibm.com>, Eric Sesterhenn <snakebyte@gmx.de>,
linux-ext4@vger.kernel.org,
Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Subject: Re: BUG_ON at mballoc.c:3752
Date: Thu, 07 Feb 2008 21:30:09 -0600 [thread overview]
Message-ID: <47ABCCC1.8070103@redhat.com> (raw)
In-Reply-To: <20080208031408.GA7111@skywalker>
Aneesh Kumar K.V wrote:
> On Thu, Feb 07, 2008 at 05:30:48PM -0800, Mingming Cao wrote:
>> On Thu, 2008-02-07 at 18:25 +0530, Aneesh Kumar K.V wrote:
>>
>>> ext4: Don't panic in case of corrupt bitmap
>>>
>>> From: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>>>
>>> Multiblock allocator was calling BUG_ON in many case if the free and used
>>> blocks count obtained looking at the bitmap is different from what
>>> the allocator internally accounted for. Use ext4_error in such case
>>> and don't panic the system.
>>>
>> There seems a lot of BUG_ON() and BUG() in mballoc code, other than this
>> case. Should it always panic the whole system in those cases? Perhaps
>> replacing with ext4_error() or some cases just WARN_ON is enough.
>>
>
> I had looked at the BUG_ON in mballoc code and found them very useful
> while stabilizing the mballoc code. It helped to catch wrong usage of
> functions. Most of the BUG_ON are there to make sure we call the API
> with the lock held or the API should not return value greater than 'x'
> Should not call the function with a particular argument as NULL ...etc
> kind of thing. So i would suggest to keep them as such.
Yep - as long as the BUG_ONs are for programming errors, and not things
like memory allocation failures or corrupted disks, I think it's ok.
Not that I've audited them all. :)
I asked about this early on, and got that answer... I'm reasonably
satisfied with it.
-Eric
next prev parent reply other threads:[~2008-02-08 3:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-31 14:01 BUG_ON at mballoc.c:3752 Eric Sesterhenn
2008-01-31 15:42 ` Eric Sesterhenn
2008-02-04 6:00 ` Aneesh Kumar K.V
2008-02-04 8:29 ` Eric Sesterhenn
2008-02-06 21:59 ` Dave Kleikamp
2008-02-07 12:55 ` Aneesh Kumar K.V
2008-02-08 1:30 ` Mingming Cao
2008-02-08 3:14 ` Aneesh Kumar K.V
2008-02-08 3:30 ` Eric Sandeen [this message]
2008-02-08 13:47 ` Eric Sesterhenn
2008-02-08 15:07 ` Eric Sesterhenn
2008-02-08 15:26 ` Eric Sandeen
2008-02-08 15:31 ` Eric Sesterhenn
2008-02-08 15:33 ` Eric Sandeen
2008-02-01 19:34 ` Mingming Cao
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=47ABCCC1.8070103@redhat.com \
--to=sandeen@redhat.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=cmm@us.ibm.com \
--cc=linux-ext4@vger.kernel.org \
--cc=shaggy@linux.vnet.ibm.com \
--cc=snakebyte@gmx.de \
/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