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 <[email protected]> Reported-by: Peter Collingbourne <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> --- 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 [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
