From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: aalbersh@kernel.org, cem@kernel.org, hch@lst.de,
linux-xfs@vger.kernel.org
Subject: Re: [PATCH 12/36] xfs: move struct xfs_log_iovec to xfs_log_priv.h
Date: Tue, 3 Mar 2026 06:44:13 -0800 [thread overview]
Message-ID: <aabzvfIxUWD2jK_e@infradead.org> (raw)
In-Reply-To: <177249637996.457970.5988457332713577268.stgit@frogsfrogsfrogs>
On Mon, Mar 02, 2026 at 04:15:16PM -0800, Darrick J. Wong wrote:
> +++ b/include/kmem.h
> @@ -60,6 +60,8 @@ static inline void *kmalloc(size_t size, gfp_t flags)
>
> #define kzalloc(size, gfp) kvmalloc((size), (gfp) | __GFP_ZERO)
> #define kvzalloc(size, gfp) kzalloc((size), (gfp))
> +#define kmalloc_array(n, size, gfp) kvmalloc((n) * (size), (gfp))
> +#define kcalloc(n, size, gfp) kmalloc_array((n), (size), (gfp) | __GFP_ZERO)
Maybe use check_mul_overflow like the kernel version?
And avoid the overly long line and maybe even turn it into an inline?
I think it would also be cleared to split adding new core helpers into
a separate commit vs tagging it onto porting kernel code that's using
them.
next prev parent reply other threads:[~2026-03-03 14:44 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-03 0:12 [PATCHSET] xfsprogs: new libxfs code from kernel 7.0 Darrick J. Wong
2026-03-03 0:12 ` [PATCH 01/36] libfrog: hoist some utilities from libxfs Darrick J. Wong
2026-03-03 14:41 ` Christoph Hellwig
2026-03-03 0:12 ` [PATCH 02/36] libfrog: fix missing gettext call in current_fixed_time Darrick J. Wong
2026-03-03 14:42 ` Christoph Hellwig
2026-03-03 0:12 ` [PATCH 03/36] xfs: start creating infrastructure for health monitoring Darrick J. Wong
2026-03-03 0:13 ` [PATCH 04/36] xfs: create event queuing, formatting, and discovery infrastructure Darrick J. Wong
2026-03-03 0:13 ` [PATCH 05/36] xfs: convey filesystem unmount events to the health monitor Darrick J. Wong
2026-03-03 0:13 ` [PATCH 06/36] xfs: convey metadata health " Darrick J. Wong
2026-03-03 0:13 ` [PATCH 07/36] xfs: convey filesystem shutdown " Darrick J. Wong
2026-03-03 0:14 ` [PATCH 08/36] xfs: convey externally discovered fsdax media errors " Darrick J. Wong
2026-03-03 0:14 ` [PATCH 09/36] xfs: convey file I/O " Darrick J. Wong
2026-03-03 0:14 ` [PATCH 10/36] xfs: check if an open file is on the health monitored fs Darrick J. Wong
2026-03-03 0:15 ` [PATCH 11/36] xfs: add media verification ioctl Darrick J. Wong
2026-03-03 0:15 ` [PATCH 12/36] xfs: move struct xfs_log_iovec to xfs_log_priv.h Darrick J. Wong
2026-03-03 14:44 ` Christoph Hellwig [this message]
2026-03-03 16:19 ` Darrick J. Wong
2026-03-03 0:15 ` [PATCH 13/36] xfs: directly include xfs_platform.h Darrick J. Wong
2026-03-03 0:15 ` [PATCH 14/36] xfs: remove xfs_attr_leaf_hasname Darrick J. Wong
2026-03-03 0:16 ` [PATCH 15/36] xfs: add missing forward declaration in xfs_zones.h Darrick J. Wong
2026-03-03 0:16 ` [PATCH 16/36] xfs: add a xfs_rtgroup_raw_size helper Darrick J. Wong
2026-03-03 0:16 ` [PATCH 17/36] xfs: split and refactor zone validation Darrick J. Wong
2026-03-03 14:45 ` Christoph Hellwig
2026-03-03 15:40 ` Darrick J. Wong
2026-03-03 0:16 ` [PATCH 18/36] xfs: delete attr leaf freemap entries when empty Darrick J. Wong
2026-03-03 0:17 ` [PATCH 19/36] xfs: fix freemap adjustments when adding xattrs to leaf blocks Darrick J. Wong
2026-03-03 0:17 ` [PATCH 20/36] xfs: refactor attr3 leaf table size computation Darrick J. Wong
2026-03-03 0:17 ` [PATCH 21/36] xfs: strengthen attr leaf block freemap checking Darrick J. Wong
2026-03-03 0:17 ` [PATCH 22/36] xfs: reduce xfs_attr_try_sf_addname parameters Darrick J. Wong
2026-03-03 0:18 ` [PATCH 23/36] xfs: speed up parent pointer operations when possible Darrick J. Wong
2026-03-03 0:18 ` [PATCH 24/36] xfs: add a method to replace shortform attrs Darrick J. Wong
2026-03-03 0:18 ` [PATCH 25/36] xfs: fix spacing style issues in xfs_alloc.c Darrick J. Wong
2026-03-03 0:18 ` [PATCH 26/36] xfs: don't validate error tags in the I/O path Darrick J. Wong
2026-03-03 0:19 ` [PATCH 27/36] xfs: add zone reset error injection Darrick J. Wong
2026-03-03 0:19 ` [PATCH 28/36] xfs: give the defer_relog stat a xs_ prefix Darrick J. Wong
2026-03-03 0:19 ` [PATCH 29/36] treewide: Replace kmalloc with kmalloc_obj for non-scalar types Darrick J. Wong
2026-03-03 14:46 ` Christoph Hellwig
2026-03-03 16:22 ` Darrick J. Wong
2026-03-03 0:19 ` [PATCH 30/36] Convert 'alloc_obj' family to use the new default GFP_KERNEL argument Darrick J. Wong
2026-03-03 14:47 ` Christoph Hellwig
2026-03-03 0:20 ` [PATCH 31/36] xfs: Refactoring the nagcount and delta calculation Darrick J. Wong
2026-03-03 0:20 ` [PATCH 32/36] xfs: fix code alignment issues in xfs_ondisk.c Darrick J. Wong
2026-03-03 0:20 ` [PATCH 33/36] xfs: remove metafile inodes from the active inode stat Darrick J. Wong
2026-03-03 14:49 ` Christoph Hellwig
2026-03-03 16:24 ` Darrick J. Wong
2026-03-03 0:21 ` [PATCH 34/36] xfs: Add a comment in xfs_log_sb() Darrick J. Wong
2026-03-03 0:21 ` [PATCH 35/36] xfs: remove duplicate static size checks Darrick J. Wong
2026-03-03 0:21 ` [PATCH 36/36] xfs: add static size checks for ioctl UABI Darrick J. Wong
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=aabzvfIxUWD2jK_e@infradead.org \
--to=hch@infradead.org \
--cc=aalbersh@kernel.org \
--cc=cem@kernel.org \
--cc=djwong@kernel.org \
--cc=hch@lst.de \
--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.