All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Brian Foster <bfoster@redhat.com>, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 3/6] xfs: remove infinite loop when reserving free block pool
Date: Mon, 28 Mar 2022 12:20:45 +1100	[thread overview]
Message-ID: <20220328012045.GS1544202@dread.disaster.area> (raw)
In-Reply-To: <164840031362.54920.15815650183086189788.stgit@magnolia>

On Sun, Mar 27, 2022 at 09:58:33AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> Infinite loops in kernel code are scary.  Calls to xfs_reserve_blocks
> should be rare (people should just use the defaults!) so we really don't
> need to try so hard.  Simplify the logic here by removing the infinite
> loop.
> 
> Cc: Brian Foster <bfoster@redhat.com>
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>

Looks good. Callers are already expected to handle failure because
ENOSPC, so removing the loop and returning ENOSPC on failure is fine
by me.

Reviewed-by: Dave Chinner <dchinner@redhat.com>

-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2022-03-28  1:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-27 16:58 [PATCHSET v4 0/6] xfs: fix incorrect reserve pool calculations and reporting Darrick J. Wong
2022-03-27 16:58 ` [PATCH 1/6] xfs: document the XFS_ALLOC_AGFL_RESERVE constant Darrick J. Wong
2022-03-28  1:18   ` Dave Chinner
2022-04-01  5:51   ` Christoph Hellwig
2022-03-27 16:58 ` [PATCH 2/6] xfs: don't include bnobt blocks when reserving free block pool Darrick J. Wong
2022-04-06 16:39   ` Christoph Hellwig
2022-03-27 16:58 ` [PATCH 3/6] xfs: remove infinite loop " Darrick J. Wong
2022-03-28  1:20   ` Dave Chinner [this message]
2022-04-06 16:40   ` Christoph Hellwig
2022-03-27 16:58 ` [PATCH 4/6] xfs: always succeed at setting the reserve pool size Darrick J. Wong
2022-03-28  1:21   ` Dave Chinner
2022-04-06 16:40   ` Christoph Hellwig
2022-03-27 16:58 ` [PATCH 5/6] xfs: fix overfilling of reserve pool Darrick J. Wong
2022-03-28  1:22   ` Dave Chinner
2022-04-06 16:42   ` Christoph Hellwig
2022-03-27 16:58 ` [PATCH 6/6] xfs: don't report reserved bnobt space as available Darrick J. Wong
2022-04-06 16:43   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220328012045.GS1544202@dread.disaster.area \
    --to=david@fromorbit.com \
    --cc=bfoster@redhat.com \
    --cc=djwong@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.