All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: Peter Collingbourne <pcc@google.com>,
	Bart Van Assche <bvanassche@acm.org>,
	linux-f2fs-devel@lists.sourceforge.net
Subject: [f2fs-dev] [PATCH v2 1/5] Fix the struct f2fs_dentry_block definition
Date: Thu, 23 Jun 2022 11:12:04 -0700	[thread overview]
Message-ID: <20220623181208.3596448-2-bvanassche@acm.org> (raw)
In-Reply-To: <20220623181208.3596448-1-bvanassche@acm.org>

Fix the struct f2fs_dentry_block definition on systems for which
PAGE_SIZE != 4096. This patch does not change the struct f2fs_dentry_block
definition if PAGE_SIZE == 4096.

Cc: Peter Collingbourne <pcc@google.com>
Reported-by: Peter Collingbourne <pcc@google.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 include/f2fs_fs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h
index 21a7e70d952d..fdbf7c7a0b35 100644
--- a/include/f2fs_fs.h
+++ b/include/f2fs_fs.h
@@ -1317,7 +1317,7 @@ typedef __le32	f2fs_hash_t;
 #define SIZE_OF_DIR_ENTRY	11	/* by byte */
 #define SIZE_OF_DENTRY_BITMAP	((NR_DENTRY_IN_BLOCK + BITS_PER_BYTE - 1) / \
 					BITS_PER_BYTE)
-#define SIZE_OF_RESERVED	(PAGE_SIZE - ((SIZE_OF_DIR_ENTRY + \
+#define SIZE_OF_RESERVED	(F2FS_BLKSIZE - ((SIZE_OF_DIR_ENTRY + \
 				F2FS_SLOT_LEN) * \
 				NR_DENTRY_IN_BLOCK + SIZE_OF_DENTRY_BITMAP))
 #define MIN_INLINE_DENTRY_SIZE		40	/* just include '.' and '..' entries */
@@ -1341,7 +1341,7 @@ struct f2fs_dentry_block {
 	__u8 filename[NR_DENTRY_IN_BLOCK][F2FS_SLOT_LEN];
 };
 
-static_assert(sizeof(struct f2fs_dentry_block) == 4096, "");
+static_assert(sizeof(struct f2fs_dentry_block) == F2FS_BLKSIZE, "");
 
 /* for inline stuff */
 #define DEF_INLINE_RESERVED_SIZE	1


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2022-06-23 18:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-23 18:12 [f2fs-dev] [PATCH v2 0/5] PAGE_SIZE and zoned storage related improvements Bart Van Assche
2022-06-23 18:12 ` Bart Van Assche [this message]
2022-06-23 18:24   ` [f2fs-dev] [PATCH v2 1/5] Fix the struct f2fs_dentry_block definition Peter Collingbourne via Linux-f2fs-devel
2022-07-17  3:35   ` Chao Yu
2022-06-23 18:12 ` [f2fs-dev] [PATCH v2 2/5] Fix f2fs_report_zone() Bart Van Assche
2022-07-17  3:35   ` Chao Yu
2022-06-23 18:12 ` [f2fs-dev] [PATCH v2 3/5] Improve compile-time type checking for f2fs_report_zone() Bart Van Assche
2022-07-17  3:36   ` Chao Yu
2022-06-23 18:12 ` [f2fs-dev] [PATCH v2 4/5] Use F2FS_BLKSIZE for dev_read_block() buffers Bart Van Assche
2022-07-17  3:37   ` Chao Yu
2022-06-23 18:12 ` [f2fs-dev] [PATCH v2 5/5] Use F2FS_BLKSIZE as the size of struct f2fs_summary_block Bart Van Assche
2022-07-17  3:39   ` Chao Yu
2022-08-24 17:41 ` [f2fs-dev] [PATCH v2 0/5] PAGE_SIZE and zoned storage related improvements Bart Van Assche
2022-08-24 20:34   ` Jaegeuk Kim
2022-08-25 17:21     ` Bart Van Assche

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=20220623181208.3596448-2-bvanassche@acm.org \
    --to=bvanassche@acm.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=pcc@google.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 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.