[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <brefgiw6mbvnpg5dmxhuwmoxfrh6upw3zslzn6qa6lfvbvhgi4@7vzwd55illrn>
Date: Fri, 2 Aug 2024 12:30:50 -0400
From: Kent Overstreet <kent.overstreet@...ux.dev>
To: Camila Alvarez <cam.alvarez.i@...il.com>
Cc: Brian Foster <bfoster@...hat.com>, linux-bcachefs@...r.kernel.org,
linux-kernel@...r.kernel.org, syzbot+1e515cab343dbe5aa38a@...kaller.appspotmail.com
Subject: Re: [PATCH] bcachefs: WARNING in bch2_trans_srcu_unlock
On Tue, Jul 23, 2024 at 09:08:00PM GMT, Camila Alvarez wrote:
> bch2_extent_fallocate should not return -BCH_ERR_transaction_restart_nested when there are no buckets available.
> Returning -BCH_ERR_transaction_restart_nested causes the sector allocation to retry even if there's no space available.
It seems like you're saying this fixes a livelock, but I don't see that:
if we return operation_blocked, the closure_sync we do before we return
will still wait.
More explanation?
>
> Reported-by: syzbot+1e515cab343dbe5aa38a@...kaller.appspotmail.com
> Signed-off-by: Camila Alvarez <cam.alvarez.i@...il.com>
> ---
> fs/bcachefs/io_misc.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/fs/bcachefs/io_misc.c b/fs/bcachefs/io_misc.c
> index 82f9170dab3f..b5b92ef030df 100644
> --- a/fs/bcachefs/io_misc.c
> +++ b/fs/bcachefs/io_misc.c
> @@ -90,8 +90,6 @@ int bch2_extent_fallocate(struct btree_trans *trans,
> opts.data_replicas,
> opts.data_replicas,
> BCH_WATERMARK_normal, 0, &cl, &wp);
> - if (bch2_err_matches(ret, BCH_ERR_operation_blocked))
> - ret = -BCH_ERR_transaction_restart_nested;
> if (ret)
> goto err;
>
> --
> 2.34.1
>
Powered by blists - more mailing lists