mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2024-11-23 01:59:54 +00:00
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>
This commit is contained in:
parent
9401f8f0eb
commit
b5a09b25b7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user