* [PATCH] Btrfs: don't panic if we get an error while balancing
@ 2011-07-01 20:21 Josef Bacik
2011-07-02 21:24 ` [PATCH] Btrfs: don't panic if we get an error while balancing V2 Josef Bacik
0 siblings, 1 reply; 2+ messages in thread
From: Josef Bacik @ 2011-07-01 20:21 UTC (permalink / raw)
To: linux-btrfs; +Cc: Anand.Jain
A user reported an error where if we try to balance an fs after a device has
been removed it will blow up. This is because we get an EIO back and this is
where BUG_ON(ret) bites us in the ass. To fix we just exit. Thanks,
Reported-by: Anand Jain <Anand.Jain@oracle.com>
Signed-off-by: Josef Bacik <josef@redhat.com>
---
fs/btrfs/volumes.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 1efa56e..685bc0f 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2098,7 +2098,8 @@ int btrfs_balance(struct btrfs_root *dev_root)
chunk_root->root_key.objectid,
found_key.objectid,
found_key.offset);
- BUG_ON(ret && ret != -ENOSPC);
+ if (ret != -ENOSPC)
+ goto error;
key.offset = found_key.offset - 1;
}
ret = 0;
--
1.7.5.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] Btrfs: don't panic if we get an error while balancing V2
2011-07-01 20:21 [PATCH] Btrfs: don't panic if we get an error while balancing Josef Bacik
@ 2011-07-02 21:24 ` Josef Bacik
0 siblings, 0 replies; 2+ messages in thread
From: Josef Bacik @ 2011-07-02 21:24 UTC (permalink / raw)
To: linux-btrfs; +Cc: Anand.Jain
A user reported an error where if we try to balance an fs after a device has
been removed it will blow up. This is because we get an EIO back and this is
where BUG_ON(ret) bites us in the ass. To fix we just exit. Thanks,
Reported-by: Anand Jain <Anand.Jain@oracle.com>
Signed-off-by: Josef Bacik <josef@redhat.com>
---
V1->V2: only break if ret is actually set, I always screw this up.
fs/btrfs/volumes.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 1efa56e..19450bc 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2098,7 +2098,8 @@ int btrfs_balance(struct btrfs_root *dev_root)
chunk_root->root_key.objectid,
found_key.objectid,
found_key.offset);
- BUG_ON(ret && ret != -ENOSPC);
+ if (ret && ret != -ENOSPC)
+ goto error;
key.offset = found_key.offset - 1;
}
ret = 0;
--
1.7.5.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-02 21:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-01 20:21 [PATCH] Btrfs: don't panic if we get an error while balancing Josef Bacik
2011-07-02 21:24 ` [PATCH] Btrfs: don't panic if we get an error while balancing V2 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).