summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArne Jansen <sensille@gmx.net>2013-01-17 09:22:08 +0100
committerChris Mason <chris.mason@fusionio.com>2013-01-22 02:18:11 +0100
commitff24858c65d9c518af41aad22fb964685351051a (patch)
tree492e08f7f9a4c0355ebd8f51a6048a0b6effc614
parentRevert "Btrfs: reorder tree mod log operations in deleting a pointer" (diff)
downloadlinux-ff24858c65d9c518af41aad22fb964685351051a.tar.xz
linux-ff24858c65d9c518af41aad22fb964685351051a.zip
Btrfs: ignore orphan qgroup relations
If a qgroup that has still assignments is deleted by the user, the corresponding relations are left in the tree. This leads to an unmountable filesystem. With this patch, those relations are simple ignored. Reported-by: Eric Hopper <hopper@omnifarious.org> Signed-off-by: Arne Jansen <sensille@gmx.net> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
-rw-r--r--fs/btrfs/qgroup.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
index fe9d02c45f8e..28f2b39f6a25 100644
--- a/fs/btrfs/qgroup.c
+++ b/fs/btrfs/qgroup.c
@@ -379,6 +379,13 @@ next1:
ret = add_relation_rb(fs_info, found_key.objectid,
found_key.offset);
+ if (ret == -ENOENT) {
+ printk(KERN_WARNING
+ "btrfs: orphan qgroup relation 0x%llx->0x%llx\n",
+ (unsigned long long)found_key.objectid,
+ (unsigned long long)found_key.offset);
+ ret = 0; /* ignore the error */
+ }
if (ret)
goto out;
next2: