aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/f2fs_fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/f2fs_fs.h')
-rw-r--r--include/linux/f2fs_fs.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/f2fs_fs.h b/include/linux/f2fs_fs.h
index 87f14e90e984..a23556c32703 100644
--- a/include/linux/f2fs_fs.h
+++ b/include/linux/f2fs_fs.h
@@ -19,12 +19,16 @@
19#define F2FS_MAX_LOG_SECTOR_SIZE 12 /* 12 bits for 4096 bytes */ 19#define F2FS_MAX_LOG_SECTOR_SIZE 12 /* 12 bits for 4096 bytes */
20#define F2FS_LOG_SECTORS_PER_BLOCK 3 /* log number for sector/blk */ 20#define F2FS_LOG_SECTORS_PER_BLOCK 3 /* log number for sector/blk */
21#define F2FS_BLKSIZE 4096 /* support only 4KB block */ 21#define F2FS_BLKSIZE 4096 /* support only 4KB block */
22#define F2FS_BLKSIZE_BITS 12 /* bits for F2FS_BLKSIZE */
22#define F2FS_MAX_EXTENSION 64 /* # of extension entries */ 23#define F2FS_MAX_EXTENSION 64 /* # of extension entries */
23#define F2FS_BLK_ALIGN(x) (((x) + F2FS_BLKSIZE - 1) / F2FS_BLKSIZE) 24#define F2FS_BLK_ALIGN(x) (((x) + F2FS_BLKSIZE - 1) / F2FS_BLKSIZE)
24 25
25#define NULL_ADDR ((block_t)0) /* used as block_t addresses */ 26#define NULL_ADDR ((block_t)0) /* used as block_t addresses */
26#define NEW_ADDR ((block_t)-1) /* used as block_t addresses */ 27#define NEW_ADDR ((block_t)-1) /* used as block_t addresses */
27 28
29#define F2FS_BYTES_TO_BLK(bytes) ((bytes) >> F2FS_BLKSIZE_BITS)
30#define F2FS_BLK_TO_BYTES(blk) ((blk) << F2FS_BLKSIZE_BITS)
31
28/* 0, 1(node nid), 2(meta nid) are reserved node id */ 32/* 0, 1(node nid), 2(meta nid) are reserved node id */
29#define F2FS_RESERVED_NODE_NUM 3 33#define F2FS_RESERVED_NODE_NUM 3
30 34
@@ -87,6 +91,7 @@ struct f2fs_super_block {
87/* 91/*
88 * For checkpoint 92 * For checkpoint
89 */ 93 */
94#define CP_FASTBOOT_FLAG 0x00000020
90#define CP_FSCK_FLAG 0x00000010 95#define CP_FSCK_FLAG 0x00000010
91#define CP_ERROR_FLAG 0x00000008 96#define CP_ERROR_FLAG 0x00000008
92#define CP_COMPACT_SUM_FLAG 0x00000004 97#define CP_COMPACT_SUM_FLAG 0x00000004
@@ -224,6 +229,8 @@ enum {
224 OFFSET_BIT_SHIFT 229 OFFSET_BIT_SHIFT
225}; 230};
226 231
232#define OFFSET_BIT_MASK (0x07) /* (0x01 << OFFSET_BIT_SHIFT) - 1 */
233
227struct node_footer { 234struct node_footer {
228 __le32 nid; /* node id */ 235 __le32 nid; /* node id */
229 __le32 ino; /* inode nunmber */ 236 __le32 ino; /* inode nunmber */