Lines Matching +full:max +full:- +full:reason
1 // SPDX-License-Identifier: GPL-2.0
14 #define F2FS_SUPER_OFFSET 1024 /* byte-size offset */
16 #define F2FS_MAX_LOG_SECTOR_SIZE PAGE_SHIFT /* Max is Block Size */
17 #define F2FS_LOG_SECTORS_PER_BLOCK (PAGE_SHIFT - 9) /* log number for sector/blk */
21 #define F2FS_EXTENSION_LEN 8 /* max size of extension */
24 #define NEW_ADDR ((block_t)-1) /* used as block_t addresses */
25 #define COMPRESS_ADDR ((block_t)-2) /* used as compressed data flag */
27 #define F2FS_BLKSIZE_MASK (F2FS_BLKSIZE - 1)
30 #define F2FS_BLK_END_BYTES(blk) (F2FS_BLK_TO_BYTES(blk + 1) - 1)
31 #define F2FS_BLK_ALIGN(x) (F2FS_BYTES_TO_BLK((x) + F2FS_BLKSIZE - 1))
36 #define F2FS_ROOT_INO(sbi) ((sbi)->root_ino_num)
37 #define F2FS_NODE_INO(sbi) ((sbi)->node_ino_num)
38 #define F2FS_META_INO(sbi) ((sbi)->meta_ino_num)
39 #define F2FS_COMPRESS_INO(sbi) (NM_I(sbi)->max_nid)
49 * For further optimization on multi-head logs, on-disk layout supports maximum
71 /* reason of stop_checkpoint */
86 /* detail reason for EFSCORRUPTED */
138 __u8 uuid[16]; /* 128-bit uuid for volume */
153 __u8 s_stop_reason[MAX_STOP_REASON]; /* stop checkpoint reason */
154 __u8 s_errors[MAX_F2FS_ERRORS]; /* reason of image corrupts */
211 #define CP_CHKSUM_OFFSET (F2FS_BLKSIZE - sizeof(__le32)) /* default chksum offset in checkpoint */
218 #define F2FS_ORPHANS_PER_BLOCK ((F2FS_BLKSIZE - 4 * sizeof(__le32)) / sizeof(__le32))
220 #define GET_ORPHAN_BLOCKS(n) (((n) + F2FS_ORPHANS_PER_BLOCK - 1) / \
257 #define DEF_ADDRS_PER_INODE ((F2FS_BLKSIZE - OFFSET_OF_END_OF_I_EXT \
258 - SIZE_OF_I_NID \
259 - sizeof(struct node_footer)) / sizeof(__le32))
260 #define CUR_ADDRS_PER_INODE(inode) (DEF_ADDRS_PER_INODE - \
265 #define DEF_ADDRS_PER_BLOCK ((F2FS_BLKSIZE - sizeof(struct node_footer)) / sizeof(__le32))
268 #define NIDS_PER_BLOCK ((F2FS_BLKSIZE - sizeof(struct node_footer)) / sizeof(__le32))
357 #define OFFSET_BIT_MASK GENMASK(OFFSET_BIT_SHIFT - 1, 0)
403 * Note that f2fs_sit_entry->vblocks has the following bit-field information.
408 #define SIT_VBLOCKS_MASK ((1 << SIT_VBLOCKS_SHIFT) - 1)
410 (le16_to_cpu((raw_sit)->vblocks) & SIT_VBLOCKS_MASK)
412 ((le16_to_cpu((raw_sit)->vblocks) & ~SIT_VBLOCKS_MASK) \
435 * - If data page, nid represents dnode's nid
436 * - If node page, nid represents the node page's nid.
468 #define SUM_JOURNAL_SIZE (F2FS_BLKSIZE - SUM_FOOTER_SIZE -\
470 #define NAT_JOURNAL_ENTRIES ((SUM_JOURNAL_SIZE - 2) /\
472 #define NAT_JOURNAL_RESERVED ((SUM_JOURNAL_SIZE - 2) %\
474 #define SIT_JOURNAL_ENTRIES ((SUM_JOURNAL_SIZE - 2) /\
476 #define SIT_JOURNAL_RESERVED ((SUM_JOURNAL_SIZE - 2) %\
482 #define EXTRA_INFO_RESERVED (SUM_JOURNAL_SIZE - 2 - 8)
531 /* Block-sized summary block structure */
548 /* One directory entry slot covers 8bytes-long file name */
552 #define GET_DENTRY_SLOTS(x) (((x) + F2FS_SLOT_LEN - 1) >> F2FS_SLOT_LEN_BITS)
554 /* MAX level for dir lookup */
557 /* MAX buckets in one level of dir */
558 #define MAX_DIR_BUCKETS BIT((MAX_DIR_HASH_DEPTH / 2) - 1)
578 #define SIZE_OF_DENTRY_BITMAP ((NR_DENTRY_IN_BLOCK + BITS_PER_BYTE - 1) / \
580 #define SIZE_OF_RESERVED (F2FS_BLKSIZE - ((SIZE_OF_DIR_ENTRY + \
585 /* One directory entry slot representing F2FS_SLOT_LEN-sized file name */
593 /* Block-sized directory entry block */