From: Christoph Hellwig <hch@lst.de>
To: Viacheslav Dubeyko <slava@dubeyko.com>
Cc: glaubitz@physik.fu-berlin.de, frank.li@vivo.com, hch@lst.de,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
vdubeyko@coreweave.com, willy@infradead.org, brauner@kernel.org,
djwong@kernel.org
Subject: Re: [PATCH v4 4/7] hfsplus: add iomap operations for regular file data
Date: Fri, 18 Sep 2026 15:36:49 +0200 [thread overview]
Message-ID: <20260918133649.GE18107@lst.de> (raw)
In-Reply-To: <20260914233941.2966421-5-slava@dubeyko.com>
On Mon, Sep 14, 2026 at 04:39:38PM -0700, Viacheslav Dubeyko wrote:
> This patch adds iomap.h and iomap.c files. The iomap.h contains
> declarations of hfsplus_iomap_ops, hfsplus_write_iomap_ops,
> hfsplus_writeback_ops, and hfsplus_write_dio_ops operations.
> The iomap.c implements __hfsplus_iomap_begin(),
> hfsplus_write_iomap_end(), hfsplus_iomap_cont_expand(),
> hfsplus_writeback_range() methods that become the basis of
> HFS+ iomap operations.
Adding this without the users in the last two patches is odd, as this
isn't really the kind of atomic change we're usually doing in Linux.
I'd vote for merging this and the last two patches into one.
> index 000000000000..5723e854e58e
> --- /dev/null
> +++ b/fs/hfsplus/iomap.c
> @@ -0,0 +1,192 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * iomap callback functions for the hfsplus filesystem
In Linux terminology these are methods, not callbacks. I'd probably just
drop this comment entirely, as it doesn't really add value, though.
> +static int hfsplus_iomap_begin(struct inode *inode, loff_t offset,
> + loff_t length, unsigned int flags,
> + struct iomap *iomap, struct iomap *srcmap)
> +{
> + return __hfsplus_iomap_begin(inode,
> + offset, length, flags,
> + iomap, false);
Odd formatting. Why not:
return __hfsplus_iomap_begin(inode, offset, length, flags, iomap,
false);
?
Also may_alloc as flags with a readable flag name might be nicer here.
> +}
> +
> +static int hfsplus_write_iomap_begin(struct inode *inode, loff_t offset,
> + loff_t length, unsigned int flags,
> + struct iomap *iomap, struct iomap *srcmap)
> +{
> + return __hfsplus_iomap_begin(inode,
> + offset, length, flags,
> + iomap, true);
> +}
Same.
> +const struct iomap_ops hfsplus_iomap_ops = {
> + .iomap_begin = hfsplus_iomap_begin,
> +};
Please use the new iomap next scheme merged in 7.3-rc. In fact
the old begin/end methods were supposed to be removed after -rc1,
but someone they managed to still stay around.
> +
> +/*
> + * hfsplus_write_iomap_end()
Duplicating the function name adds no value.
Same for the other functions.
> @@ -0,0 +1,18 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * iomap callback declarations for the hfsplus filesystem
> + */
Same comment as for iomap.c.
> +static inline
> +int iomap_dio_end_io(struct kiocb *iocb, ssize_t size,
> + int error, unsigned int flags)
Odd formatting, normally we'd do:
static inline int iomap_dio_end_io(struct kiocb *iocb, ssize_t size, int error,
unsigned int flags)
or:
static inline int
iomap_dio_end_io(struct kiocb *iocb, ssize_t size, int error,
unsigned int flags)
next prev parent reply other threads:[~2026-09-18 13:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 23:39 [PATCH v4 0/7] hfsplus: convert regular file I/O to iomap-based operations Viacheslav Dubeyko
2026-09-14 23:39 ` [PATCH v4 1/7] hfs/hfsplus: exchange hardcoded number of extents on named constants Viacheslav Dubeyko
2026-09-18 13:28 ` Christoph Hellwig
2026-09-14 23:39 ` [PATCH v4 2/7] hfsplus: rework hfsplus_get_block() logic Viacheslav Dubeyko
2026-09-15 2:34 ` Darrick J. Wong
2026-09-15 18:34 ` Viacheslav Dubeyko
2026-09-18 13:29 ` Christoph Hellwig
2026-09-14 23:39 ` [PATCH v4 3/7] hfsplus: take the bitmap page lock for allocate/free Viacheslav Dubeyko
2026-09-18 13:30 ` Christoph Hellwig
2026-09-14 23:39 ` [PATCH v4 4/7] hfsplus: add iomap operations for regular file data Viacheslav Dubeyko
2026-09-18 13:36 ` Christoph Hellwig [this message]
2026-09-14 23:39 ` [PATCH v4 5/7] hfsplus: move file related operations to file.c Viacheslav Dubeyko
2026-09-15 2:22 ` Darrick J. Wong
2026-09-18 13:31 ` Christoph Hellwig
2026-09-14 23:39 ` [PATCH v4 6/7] hfsplus: introduce iomap-based file_operations Viacheslav Dubeyko
2026-09-18 13:39 ` Christoph Hellwig
2026-09-14 23:39 ` [PATCH v4 7/7] hfsplus: switch address_space_operations on iomap-based support Viacheslav Dubeyko
2026-09-15 2:21 ` Darrick J. Wong
2026-09-15 18:37 ` Viacheslav Dubeyko
2026-09-18 13:57 ` Christoph Hellwig
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=20260918133649.GE18107@lst.de \
--to=hch@lst.de \
--cc=brauner@kernel.org \
--cc=djwong@kernel.org \
--cc=frank.li@vivo.com \
--cc=glaubitz@physik.fu-berlin.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=slava@dubeyko.com \
--cc=vdubeyko@coreweave.com \
--cc=willy@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®