You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
f2fs: introduce accessor to retrieve number of dentry slots
Simplify code by providing the accessor macro to retrieve the number of dentry slots for a given filename length. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
This commit is contained in:
@@ -363,6 +363,9 @@ typedef __le32 f2fs_hash_t;
|
||||
|
||||
/* One directory entry slot covers 8bytes-long file name */
|
||||
#define F2FS_NAME_LEN 8
|
||||
#define F2FS_NAME_LEN_BITS 3
|
||||
|
||||
#define GET_DENTRY_SLOTS(x) ((x + F2FS_NAME_LEN - 1) >> F2FS_NAME_LEN_BITS)
|
||||
|
||||
/* the number of dentry in a block */
|
||||
#define NR_DENTRY_IN_BLOCK 214
|
||||
|
||||
Reference in New Issue
Block a user