linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* On Removing BUG_ON macros
@ 2010-11-07  7:16 Yoshinori Sano
  2010-11-07 14:51 ` Josef Bacik
  2010-11-08  2:36 ` Ian Kent
  0 siblings, 2 replies; 14+ messages in thread
From: Yoshinori Sano @ 2010-11-07  7:16 UTC (permalink / raw)
  To: chris.mason, josef, linux-btrfs

This is a question I've posted on the #btrfs IRC channel today.
hyperair adviced me to contact with Josef Bacik or Chris Mason.
So, I post my question to this maling list.

Here are my post on the IRC:

Actually, I want to remove BUG_ON(ret) around the Btrfs code.
The motivation is to make the Btrfs code more robust.
First of all, is this meaningless?

For example, there are code like the following:

    struct btrfs_path *path;
    path = btrfs_alloc_path();
    BUG_ON(!path);

This is a frequenty used pattern of current Btrfs code.
A btrfs_alloc_path()'s caller has to deal with the allocation failure
instead of using BUG_ON.  However, (this is what most interesting
thing for me) can the caller do any proper error handlings here?
I mean, is this a critical situation where we cannot recover from?

-- 
Yoshinori Sano <yoshinori.sano@gmail.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-12-01 18:31 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-07  7:16 On Removing BUG_ON macros Yoshinori Sano
2010-11-07 14:51 ` Josef Bacik
2010-11-08  2:54   ` Ian Kent
2010-11-08 12:42     ` Josef Bacik
2010-11-08 14:06       ` Ian Kent
2010-11-08 14:15         ` Josef Bacik
2010-11-08 15:02           ` Ian Kent
2010-11-11  4:32             ` Ian Kent
2010-12-01 18:31               ` Josef Bacik
2010-11-09  6:13       ` Yoshinori Sano
2010-11-08 13:17   ` Yoshinori Sano
2010-11-08 13:28     ` Josef Bacik
2010-11-08 23:02       ` Yoshinori Sano
2010-11-08  2:36 ` Ian Kent

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).