Linux XFS filesystem development
 help / color / mirror / Atom feed
* [PATCH 0/3 V3] libxfs: better cache allocation error handling
@ 2026-09-25 19:41 Eric Sandeen
  2026-09-25 19:41 ` [PATCH 1/3] libxfs: change cache_node_allocate function signature Eric Sandeen
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Eric Sandeen @ 2026-09-25 19:41 UTC (permalink / raw)
  To: linux-xfs; +Cc: djwong, aalbersh

OK, 3rd try.

This is to handle an underlying problem that an actual ENOMEM cache
node allocation failure is indistinguishable from "current cache full"
and so ENOMEM may send us into a pointless cache-expansion loop which
ultimately overflows the cache size variable, rather than just reporting
the bad news up the chain to callers.

Darrick suggested "I think I'd almost rather we change cache_node_allocate
to return int and the cache node as an outparam since we do that elsewhere"

on the last review cycle, and so I've done that here, I agree that it
is cleaner.

The first patch is maybe too granular but for some reason this stuff
hurts my brain a little and I thought it helped with clarity; it's a
no-op change to cache_node_allocate's signature, returning an int
and passing the cache node as a param.

Second patch should actually catch and bubble up any low-level error.

3rd patch is defensive against a case which in theory should almost never
happen after the other fixes.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-09-28 15:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-25 19:41 [PATCH 0/3 V3] libxfs: better cache allocation error handling Eric Sandeen
2026-09-25 19:41 ` [PATCH 1/3] libxfs: change cache_node_allocate function signature Eric Sandeen
2026-09-25 22:56   ` Darrick J. Wong
2026-09-25 19:41 ` [PATCH 2/3] libxfs: Return -ENOMEM on actual cache node allocation failures Eric Sandeen
2026-09-25 22:58   ` Darrick J. Wong
2026-09-28 15:07     ` Eric Sandeen
2026-09-25 19:41 ` [PATCH 3/3] libxfs: do not allow cache growth to overflow Eric Sandeen
2026-09-25 22:59   ` Darrick J. Wong
2026-09-28  8:16 ` [PATCH 0/3 V3] libxfs: better cache allocation error handling Christoph Hellwig
2026-09-28 15:05   ` Eric Sandeen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox