Skip to content

Commit

Permalink
Btrfs: ignore orphan qgroup relations
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Arne Jansen <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
  • Loading branch information
Arne Jansen authored and Chris Mason committed Jan 22, 2013
1 parent 57ba86c commit ff24858
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fs/btrfs/qgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,13 @@ int btrfs_read_qgroup_config(struct btrfs_fs_info *fs_info)

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:
Expand Down

0 comments on commit ff24858

Please sign in to comment.