* [PATCH] Btrfs: do not BUG if we fail to remove the orphan item for dead snapshots
@ 2010-12-08 17:25 Josef Bacik
2010-12-10 7:16 ` Li Zefan
0 siblings, 1 reply; 4+ messages in thread
From: Josef Bacik @ 2010-12-08 17:25 UTC (permalink / raw)
To: linux-btrfs
Not being able to delete an orphan item isn't a horrible thing. The worst that
happens is the next time around we try and do the orphan cleanup and we can't
find the referenced object and just delete the item and move on. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
---
fs/btrfs/extent-tree.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 8aed05e..8c26441 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -6354,7 +6354,6 @@ int btrfs_drop_snapshot(struct btrfs_root *root,
if (ret > 0) {
ret = btrfs_del_orphan_item(trans, tree_root,
root->root_key.objectid);
- BUG_ON(ret);
}
}
--
1.6.6.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Btrfs: do not BUG if we fail to remove the orphan item for dead snapshots
2010-12-08 17:25 [PATCH] Btrfs: do not BUG if we fail to remove the orphan item for dead snapshots Josef Bacik
@ 2010-12-10 7:16 ` Li Zefan
2010-12-10 13:30 ` Josef Bacik
0 siblings, 1 reply; 4+ messages in thread
From: Li Zefan @ 2010-12-10 7:16 UTC (permalink / raw)
To: Josef Bacik; +Cc: linux-btrfs
01:25, Josef Bacik wrote:
> Not being able to delete an orphan item isn't a horrible thing. The worst that
> happens is the next time around we try and do the orphan cleanup and we can't
> find the referenced object and just delete the item and move on. Thanks,
>
Would be better to add code comment? Otherwise later people may wonder why
the return value is not checked and see it as a bug.
> Signed-off-by: Josef Bacik <josef@redhat.com>
> ---
> fs/btrfs/extent-tree.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
> index 8aed05e..8c26441 100644
> --- a/fs/btrfs/extent-tree.c
> +++ b/fs/btrfs/extent-tree.c
> @@ -6354,7 +6354,6 @@ int btrfs_drop_snapshot(struct btrfs_root *root,
> if (ret > 0) {
> ret = btrfs_del_orphan_item(trans, tree_root,
> root->root_key.objectid);
> - BUG_ON(ret);
> }
> }
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Btrfs: do not BUG if we fail to remove the orphan item for dead snapshots
2010-12-10 7:16 ` Li Zefan
@ 2010-12-10 13:30 ` Josef Bacik
2010-12-10 14:22 ` Chris Mason
0 siblings, 1 reply; 4+ messages in thread
From: Josef Bacik @ 2010-12-10 13:30 UTC (permalink / raw)
To: Li Zefan; +Cc: Josef Bacik, linux-btrfs
On Fri, Dec 10, 2010 at 03:16:15PM +0800, Li Zefan wrote:
> 01:25, Josef Bacik wrote:
> > Not being able to delete an orphan item isn't a horrible thing. The worst that
> > happens is the next time around we try and do the orphan cleanup and we can't
> > find the referenced object and just delete the item and move on. Thanks,
> >
>
> Would be better to add code comment? Otherwise later people may wonder why
> the return value is not checked and see it as a bug.
>
Comments are against Btrfs' coding style guidlines.
Josef
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Btrfs: do not BUG if we fail to remove the orphan item for dead snapshots
2010-12-10 13:30 ` Josef Bacik
@ 2010-12-10 14:22 ` Chris Mason
0 siblings, 0 replies; 4+ messages in thread
From: Chris Mason @ 2010-12-10 14:22 UTC (permalink / raw)
To: Josef Bacik; +Cc: Li Zefan, linux-btrfs
Excerpts from Josef Bacik's message of 2010-12-10 08:30:36 -0500:
> On Fri, Dec 10, 2010 at 03:16:15PM +0800, Li Zefan wrote:
> > 01:25, Josef Bacik wrote:
> > > Not being able to delete an orphan item isn't a horrible thing. The worst that
> > > happens is the next time around we try and do the orphan cleanup and we can't
> > > find the referenced object and just delete the item and move on. Thanks,
> > >
> >
> > Would be better to add code comment? Otherwise later people may wonder why
> > the return value is not checked and see it as a bug.
> >
>
> Comments are against Btrfs' coding style guidlines.
But not the new and improved coding style guidelines ;)
-chris
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-12-10 14:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-08 17:25 [PATCH] Btrfs: do not BUG if we fail to remove the orphan item for dead snapshots Josef Bacik
2010-12-10 7:16 ` Li Zefan
2010-12-10 13:30 ` Josef Bacik
2010-12-10 14:22 ` Chris Mason
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).