Re: [PATCH 03/15] reftable/stack: use error codes when locking fails during compaction
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Mar 20, 2024, 22:14 UTC
- Message-ID
- <CAOLa=ZS6uF3fuor3V2F_GM__JNRpUAyLcrVDbCHsJ6JStL96cA@mail.gmail.com>
- In-Reply-To
- <ae2130ffda2135bdea11ea6764c08e98a2cc4905.1710706118.git.ps@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 14 quoted lines
> diff --git a/reftable/stack.c b/reftable/stack.c
> index eaa8bb9c99..ba15c48ddd 100644
> --- a/reftable/stack.c
> +++ b/reftable/stack.c
> @@ -1003,7 +1003,7 @@ static int stack_compact_range(struct reftable_stack *st,
> LOCK_NO_DEREF);
> if (err < 0) {
> if (errno == EEXIST)
> - err = 1;
> + err = REFTABLE_LOCK_ERROR;
> else
> err = REFTABLE_IO_ERROR;
> goto done;
>The comment at the top of the function now needs to be re-written with this change.