Linux filesystem development
 help / color / mirror / Atom feed
From: Viacheslav Dubeyko <slava@dubeyko.com>
To: glaubitz@physik.fu-berlin.de, frank.li@vivo.com, hch@lst.de
Cc: linux-fsdevel@vger.kernel.org, vdubeyko@coreweave.com,
	Viacheslav Dubeyko <slava@dubeyko.com>
Subject: [PATCH v2 1/7] hfs/hfsplus: exchange hardcoded number of extents on named constants
Date: Wed, 26 Aug 2026 15:56:08 -0700	[thread overview]
Message-ID: <20260826225614.486112-2-slava@dubeyko.com> (raw)
In-Reply-To: <20260826225614.486112-1-slava@dubeyko.com>

Replace the magic 8/3 fork extent-count literals with named
constants (HFS_FORK_EXTENT_COUNT and HFSPLUS_FORK_EXTENT_COUNT).
No functional change.

cc: Christoph Hellwig <hch@lst.de>
cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
cc: Yangtao Li <frank.li@vivo.com>
cc: linux-fsdevel@vger.kernel.org
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Viacheslav Dubeyko <slava@dubeyko.com>
---
 include/linux/hfs_common.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/include/linux/hfs_common.h b/include/linux/hfs_common.h
index d6a615e74b26..8673933bbee5 100644
--- a/include/linux/hfs_common.h
+++ b/include/linux/hfs_common.h
@@ -171,18 +171,22 @@ enum {
 	HFS_XATTR_NAME,
 };
 
+#define HFS_FORK_EXTENT_COUNT	(3)
+
 struct hfs_extent {
 	__be16 block;
 	__be16 count;
 };
-typedef struct hfs_extent hfs_extent_rec[3];
+typedef struct hfs_extent hfs_extent_rec[HFS_FORK_EXTENT_COUNT];
+
+#define HFSPLUS_FORK_EXTENT_COUNT	(8)
 
 /* A single contiguous area of a file */
 struct hfsplus_extent {
 	__be32 start_block;
 	__be32 block_count;
 } __packed;
-typedef struct hfsplus_extent hfsplus_extent_rec[8];
+typedef struct hfsplus_extent hfsplus_extent_rec[HFSPLUS_FORK_EXTENT_COUNT];
 
 /* Information for a "Fork" in a file */
 struct hfsplus_fork_raw {
-- 
2.43.0


  reply	other threads:[~2026-08-26 22:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-26 22:56 [PATCH v2 0/7] hfsplus: convert regular file I/O to iomap-based operations Viacheslav Dubeyko
2026-08-26 22:56 ` Viacheslav Dubeyko [this message]
2026-08-26 22:56 ` [PATCH v2 2/7] hfsplus: rework hfsplus_get_block() logic Viacheslav Dubeyko
2026-08-26 22:56 ` [PATCH v2 3/7] hfsplus: take the bitmap page lock for allocate/free Viacheslav Dubeyko
2026-08-26 22:56 ` [PATCH v2 4/7] hfsplus: add iomap operations for regular file data Viacheslav Dubeyko
2026-08-26 22:56 ` [PATCH v2 5/7] hfsplus: move file related operations to file.c Viacheslav Dubeyko
2026-08-26 22:56 ` [PATCH v2 6/7] hfsplus: introduce iomap-based file_operations Viacheslav Dubeyko
2026-08-26 22:56 ` [PATCH v2 7/7] hfsplus: switch address_space_operations on iomap-based support Viacheslav Dubeyko
2026-08-27  0:06 ` [PATCH v2 0/7] hfsplus: convert regular file I/O to iomap-based operations Matthew Wilcox
2026-08-27 18:35   ` Viacheslav Dubeyko
2026-08-27 19:35     ` Pedro Falcato
2026-08-28 21:52       ` Viacheslav Dubeyko
2026-08-28 20:46     ` Matthew Wilcox
2026-08-28 21:26       ` Viacheslav Dubeyko
2026-08-27  7:07 ` [syzbot ci] " syzbot ci

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=20260826225614.486112-2-slava@dubeyko.com \
    --to=slava@dubeyko.com \
    --cc=frank.li@vivo.com \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=vdubeyko@coreweave.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