From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Christoph Hellwig <hch@infradead.org>,
zlang@redhat.com, fstests@vger.kernel.org,
linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/7] generic/427: try to ensure there's some free space before we do the aio test
Date: Tue, 12 Aug 2025 23:24:11 -0700 [thread overview]
Message-ID: <aJwvi03EX0LWzXfI@infradead.org> (raw)
In-Reply-To: <20250813061452.GC7981@frogsfrogsfrogs>
On Tue, Aug 12, 2025 at 11:14:52PM -0700, Darrick J. Wong wrote:
> Yeah... for the other ENOSPC-on-write paths, we kick inodegc, so maybe
> xfs_zoned_space_reserve (or its caller, more likely) ought to do that
> too?
Can you give this a spin? Still running testing here, but so far
nothing blew up.
diff --git a/fs/xfs/xfs_zone_space_resv.c b/fs/xfs/xfs_zone_space_resv.c
index 1313c55b8cbe..9cd38716fd25 100644
--- a/fs/xfs/xfs_zone_space_resv.c
+++ b/fs/xfs/xfs_zone_space_resv.c
@@ -10,6 +10,7 @@
#include "xfs_mount.h"
#include "xfs_inode.h"
#include "xfs_rtbitmap.h"
+#include "xfs_icache.h"
#include "xfs_zone_alloc.h"
#include "xfs_zone_priv.h"
#include "xfs_zones.h"
@@ -230,6 +231,11 @@ xfs_zoned_space_reserve(
error = xfs_dec_freecounter(mp, XC_FREE_RTEXTENTS, count_fsb,
flags & XFS_ZR_RESERVED);
+ if (error == -ENOSPC && !(flags & XFS_ZR_NOWAIT)) {
+ xfs_inodegc_flush(mp);
+ error = xfs_dec_freecounter(mp, XC_FREE_RTEXTENTS, count_fsb,
+ flags & XFS_ZR_RESERVED);
+ }
if (error == -ENOSPC && (flags & XFS_ZR_GREEDY) && count_fsb > 1)
error = xfs_zoned_reserve_extents_greedy(mp, &count_fsb, flags);
if (error)
next prev parent reply other threads:[~2025-08-13 6:24 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-29 20:08 [PATCHSET 1/3] fstests: fixes for atomic writes tests Darrick J. Wong
2025-07-29 20:08 ` [PATCH 2/7] generic/427: try to ensure there's some free space before we do the aio test Darrick J. Wong
2025-07-30 14:18 ` Christoph Hellwig
2025-08-12 18:54 ` Darrick J. Wong
2025-08-13 5:15 ` Christoph Hellwig
2025-08-13 6:14 ` Darrick J. Wong
2025-08-13 6:24 ` Christoph Hellwig [this message]
2025-08-14 22:16 ` Darrick J. Wong
2025-08-18 4:37 ` Christoph Hellwig
2025-07-29 20:09 ` [PATCH 3/7] generic/767: require fallocate support Darrick J. Wong
2025-07-30 14:19 ` Christoph Hellwig
2025-08-04 7:38 ` John Garry
2025-07-29 20:09 ` [PATCH 4/7] generic/767: only test the hardware atomic write unit Darrick J. Wong
2025-07-30 14:19 ` Christoph Hellwig
2025-08-04 7:41 ` John Garry
2025-07-29 20:09 ` [PATCH 5/7] generic/767: allow on any atomic writes filesystem Darrick J. Wong
2025-08-01 18:56 ` Zorro Lang
2025-08-04 7:50 ` John Garry
2025-07-29 20:09 ` [PATCH 6/7] xfs/838: actually force usage of the realtime device Darrick J. Wong
2025-07-30 14:19 ` Christoph Hellwig
2025-08-04 8:02 ` John Garry
2025-07-29 20:10 ` [PATCH 7/7] common: fix _require_xfs_io_command pwrite -A for various blocksizes Darrick J. Wong
2025-08-01 18:53 ` Zorro Lang
2025-08-27 18:04 ` Darrick J. Wong
2025-08-04 8:07 ` John Garry
2025-08-01 6:19 ` [PATCHSET 1/3] fstests: fixes for atomic writes tests Zorro Lang
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=aJwvi03EX0LWzXfI@infradead.org \
--to=hch@infradead.org \
--cc=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=zlang@redhat.com \
/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.