From: hch <hch@lst.de>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Hans Holmberg <Hans.Holmberg@wdc.com>,
"linux-xfs@vger.kernel.org" <linux-xfs@vger.kernel.org>,
Carlos Maiolino <cem@kernel.org>,
Dave Chinner <david@fromorbit.com>, hch <hch@lst.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH 1/2] xfs: free the item in xfs_mru_cache_insert on failure
Date: Mon, 5 May 2025 07:45:49 +0200 [thread overview]
Message-ID: <20250505054549.GA21045@lst.de> (raw)
In-Reply-To: <20250502200646.GT25675@frogsfrogsfrogs>
On Fri, May 02, 2025 at 01:06:46PM -0700, Darrick J. Wong wrote:
> > atomic_inc(&pag_group(args->pag)->xg_active_ref);
> > item->pag = args->pag;
> > - error = xfs_mru_cache_insert(mp->m_filestream, pino, &item->mru);
> > - if (error)
> > - goto out_free_item;
> > + xfs_mru_cache_insert(mp->m_filestream, pino, &item->mru);
>
> Hmm, don't you still need to check for -ENOMEM returns? Or if truly
> none of the callers care anymore, then can we get rid of the return
> value for xfs_mru_cache_insert?
Both for file streams and the zone association in the next patch the
mru cache is just a hint, so we ignore all errors (see the return 0
in the error handling boilerplate in the existing code). But hardcoding
that assumption into the core mru cache helpers seems a bit weird.
next prev parent reply other threads:[~2025-05-05 5:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-30 8:41 [RFC PATCH 0/2] Add mru cache for inode to zone allocation mapping Hans Holmberg
2025-04-30 8:41 ` [RFC PATCH 1/2] xfs: free the item in xfs_mru_cache_insert on failure Hans Holmberg
2025-05-02 20:06 ` Darrick J. Wong
2025-05-05 5:45 ` hch [this message]
2025-05-05 15:07 ` Darrick J. Wong
2025-04-30 8:41 ` [RFC PATCH 2/2] xfs: add inode to zone caching for data placement Hans Holmberg
2025-05-02 20:04 ` Darrick J. Wong
2025-05-05 5:55 ` hch
2025-05-05 5:57 ` [RFC PATCH 0/2] Add mru cache for inode to zone allocation mapping hch
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=20250505054549.GA21045@lst.de \
--to=hch@lst.de \
--cc=Hans.Holmberg@wdc.com \
--cc=cem@kernel.org \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=linux-kernel@vger.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.