* [PATCH] Btrfs: don't bug_on when we fail when cleaning up transactions
@ 2013-07-31 14:29 Josef Bacik
2013-08-01 17:50 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: Josef Bacik @ 2013-07-31 14:29 UTC (permalink / raw)
To: linux-btrfs
There is no reason for this sort of jackassery. Thanks,
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
---
fs/btrfs/transaction.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 18f7e71..ea8d522 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -1942,6 +1942,5 @@ int btrfs_clean_one_deleted_snapshot(struct btrfs_root *root)
* If we encounter a transaction abort during snapshot cleaning, we
* don't want to crash here
*/
- BUG_ON(ret < 0 && ret != -EAGAIN && ret != -EROFS);
- return 1;
+ return (ret < 0) ? 0 : 1;
}
--
1.7.7.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Btrfs: don't bug_on when we fail when cleaning up transactions
2013-07-31 14:29 [PATCH] Btrfs: don't bug_on when we fail when cleaning up transactions Josef Bacik
@ 2013-08-01 17:50 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2013-08-01 17:50 UTC (permalink / raw)
To: Josef Bacik; +Cc: linux-btrfs
On Wed, Jul 31, 2013 at 10:29:23AM -0400, Josef Bacik wrote:
> There is no reason for this sort of jackassery. Thanks,
>
> Signed-off-by: Josef Bacik <jbacik@fusionio.com>
> ---
> fs/btrfs/transaction.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
> index 18f7e71..ea8d522 100644
> --- a/fs/btrfs/transaction.c
> +++ b/fs/btrfs/transaction.c
> @@ -1942,6 +1942,5 @@ int btrfs_clean_one_deleted_snapshot(struct btrfs_root *root)
> * If we encounter a transaction abort during snapshot cleaning, we
> * don't want to crash here
> */
> - BUG_ON(ret < 0 && ret != -EAGAIN && ret != -EROFS);
> - return 1;
> + return (ret < 0) ? 0 : 1;
The reason was to let known harmless error codes pass and catch the
unexpected ones, but the whitelist was incomplete and I guess you've seen
something like ENOMEM or EIO. As the cleaning process is restartable I'm
ok with removing the bugon.
Reviewed-by: David Sterba <dsterba@suse.cz>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-01 17:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-31 14:29 [PATCH] Btrfs: don't bug_on when we fail when cleaning up transactions Josef Bacik
2013-08-01 17:50 ` David Sterba
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).