From: Eric Sandeen <sandeen@sandeen.net>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: "user.mail" <sandeen@redhat.com>, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/2] xfs_repair: distinguish true ENOMEM from "not found" in cache_node_get
Date: Tue, 25 Aug 2026 10:50:51 -0500 [thread overview]
Message-ID: <6824bd6b-7c4e-4288-bfe7-4d6ae70cd9b3@sandeen.net> (raw)
In-Reply-To: <20260825154902.GR6072@frogsfrogsfrogs>
On 8/25/26 10:49 AM, Darrick J. Wong wrote:
> On Tue, Aug 25, 2026 at 10:39:08AM -0500, Eric Sandeen wrote:
...
>>> Also,
>>> maybe we should be "return -ENOMEM" here or something?
>>
>> Then have callers check, etc. Do you want me to rework things to rationalize
>> the return values (and caller checks?)
>
> Yeah, I think __cache_lookup should do something with the new return
> codes, e.g.
>
> int ret = cache_node_get(bcache, key, &cn);
> if (ret < 0) {
> fprintf(stderr,
> "%s occurred, go buy a real computer!\n",
> strerror(-ret));
> abort();
> }
> if (!cn)
> return -ENOMEM;
> bp = container_of(cn, struct xfs_buf, b_node);
>
> This can be a third patch, the first two patches look good to me aside
> from having weird SoB lines.
Fair enough, I was staying in the weird "we have distinct error codes that
are never checked" world and should have fixed that up at the same time,
for tidiness.
-Eric
prev parent reply other threads:[~2026-08-25 15:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-24 19:58 [PATCH 0/2] xfs_repair: improve caching in the face of ENOMEM user.mail
2026-08-24 19:58 ` [PATCH 1/2] xfs_repair: do not allow cache growth to overflow user.mail
2026-08-25 3:17 ` Darrick J. Wong
2026-08-25 12:36 ` Eric Sandeen
2026-08-24 19:59 ` [PATCH 2/2] xfs_repair: distinguish true ENOMEM from "not found" in cache_node_get user.mail
2026-08-25 3:18 ` Darrick J. Wong
2026-08-25 15:39 ` Eric Sandeen
2026-08-25 15:49 ` Darrick J. Wong
2026-08-25 15:50 ` Eric Sandeen [this message]
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=6824bd6b-7c4e-4288-bfe7-4d6ae70cd9b3@sandeen.net \
--to=sandeen@sandeen.net \
--cc=djwong@kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox