From: Ian Kent <raven@themaw.net>
To: kreijack@libero.it
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH V2] Removing a subvolume by an ordinary user
Date: Mon, 18 Oct 2010 14:02:15 +0800 [thread overview]
Message-ID: <1287381735.3114.13.camel@localhost> (raw)
In-Reply-To: <201010171753.45661.kreijack@libero.it>
On Sun, 2010-10-17 at 17:53 +0200, Goffredo Baroncelli wrote:
> On Tuesday, 12 October, 2010, Ian Kent wrote:
> > On Mon, 2010-10-11 at 20:08 +0200, Goffredo Baroncelli wrote:
> [...]
> > > + ret = btrfs_unlink_subvol(trans, root, dir,
> > > + dest->root_key.objectid,
> > > + dentry->d_name.name,
> > > + dentry->d_name.len);
> > > + BUG_ON(ret);
> >
> > Is it really a good idea to add even more dead end BUG_ON() calls
> > instead of handling errors when they happen?
> >
>
> I agree with your comment, I copied these lines from the ioctl DESTROY_SUBVOL.
> Unfortunately I don't have the know-how to handle an error at this level. So I
> can only leave the code as the original one.
Right, sadly someone is going to have to go through and reconcile all
these things at some point.
I picked a function and started analyzing what would be needed
(including dependent functions) to handle the error return instead of
BUG_ON()ing and it's not trivial at all.
Ian
prev parent reply other threads:[~2010-10-18 6:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-11 18:08 [PATCH V2] Removing a subvolume by an ordinary user Goffredo Baroncelli
2010-10-12 5:05 ` Ian Kent
2010-10-17 15:53 ` Goffredo Baroncelli
2010-10-18 6:02 ` Ian Kent [this message]
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=1287381735.3114.13.camel@localhost \
--to=raven@themaw.net \
--cc=kreijack@libero.it \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.