aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2022-06-23 11:12:04 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2022-07-21 19:25:01 -0700
commit648a49128addf88934b355725eadf21603db7cc5 (patch)
tree62df47e5d7770ac7267a96f1e233c307033f4170
parentc964547d772743e4a754435810d634b87097f005 (diff)
downloadf2fs-tools-648a49128addf88934b355725eadf21603db7cc5.tar.gz
Fix the struct f2fs_dentry_block definition
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> Reviewed-by: Chao Yu <chao@kernel.org> Reviewed-by: Peter Collingbourne <pcc@google.com> Tested-by: Peter Collingbourne <pcc@google.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--include/f2fs_fs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h
index 21a7e70..fdbf7c7 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