mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 21:21:09 +00:00
f2fs: allow address pointer number of dnode aligning to specified size
This patch expands scalability of dnode layout, it allows address pointer number of dnode aligning to specified size (now, the size is one byte by default), and later the number can align to compress cluster size (1 << n bytes, n=[2,..)), it can avoid cluster acrossing two dnode, making design of compress meta layout simple. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
2df0ab0457
commit
d02a6e6174
6 changed files with 23 additions and 14 deletions
|
@ -198,11 +198,12 @@ struct f2fs_extent {
|
|||
get_extra_isize(inode))
|
||||
#define DEF_NIDS_PER_INODE 5 /* Node IDs in an Inode */
|
||||
#define ADDRS_PER_INODE(inode) addrs_per_inode(inode)
|
||||
#define ADDRS_PER_BLOCK 1018 /* Address Pointers in a Direct Block */
|
||||
#define DEF_ADDRS_PER_BLOCK 1018 /* Address Pointers in a Direct Block */
|
||||
#define ADDRS_PER_BLOCK(inode) addrs_per_block(inode)
|
||||
#define NIDS_PER_BLOCK 1018 /* Node IDs in an Indirect Block */
|
||||
|
||||
#define ADDRS_PER_PAGE(page, inode) \
|
||||
(IS_INODE(page) ? ADDRS_PER_INODE(inode) : ADDRS_PER_BLOCK)
|
||||
(IS_INODE(page) ? ADDRS_PER_INODE(inode) : ADDRS_PER_BLOCK(inode))
|
||||
|
||||
#define NODE_DIR1_BLOCK (DEF_ADDRS_PER_INODE + 1)
|
||||
#define NODE_DIR2_BLOCK (DEF_ADDRS_PER_INODE + 2)
|
||||
|
@ -267,7 +268,7 @@ struct f2fs_inode {
|
|||
} __packed;
|
||||
|
||||
struct direct_node {
|
||||
__le32 addr[ADDRS_PER_BLOCK]; /* array of data block address */
|
||||
__le32 addr[DEF_ADDRS_PER_BLOCK]; /* array of data block address */
|
||||
} __packed;
|
||||
|
||||
struct indirect_node {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue