* [PATCH] Btrfs: do not BUG if we fail to remove the orphan item for dead snapshots UPDATED
@ 2010-12-10 15:06 Josef Bacik
0 siblings, 0 replies; only message in thread
From: Josef Bacik @ 2010-12-10 15:06 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>
---
V1->V2: Added a comment to explain what we'r doing.
fs/btrfs/extent-tree.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 8aed05e..d2add51 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -6352,9 +6352,14 @@ int btrfs_drop_snapshot(struct btrfs_root *root,
NULL, NULL);
BUG_ON(ret < 0);
if (ret > 0) {
+ /*
+ * Don't bother checking the return value, either we
+ * succeeded or we did not, either way the orphan item
+ * will get cleaned up properly, wether its now or on
+ * the next mount.
+ */
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] only message in thread
only message in thread, other threads:[~2010-12-10 15:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-10 15:06 [PATCH] Btrfs: do not BUG if we fail to remove the orphan item for dead snapshots UPDATED Josef Bacik
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).