diff options
author | 2013-08-14 21:57:27 +0900 | |
---|---|---|
committer | 2013-08-26 20:15:23 +0900 | |
commit | 65985d935ddd5657c66a8bb3ae9752ed842549b8 (patch) | |
tree | 5eea77933c96f3007cdc29b6fa06c313737003f6 /include/linux/f2fs_fs.h | |
parent | f2fs: add the truncate_xattr_node function (diff) | |
download | linux-65985d935ddd5657c66a8bb3ae9752ed842549b8.tar.gz linux-65985d935ddd5657c66a8bb3ae9752ed842549b8.tar.bz2 linux-65985d935ddd5657c66a8bb3ae9752ed842549b8.zip |
f2fs: support the inline xattrs
0. modified inode structure
--------------------------------------
metadata (e.g., i_mtime, i_ctime, etc)
--------------------------------------
direct pointers [0 ~ 873]
inline xattrs (200 bytes by default)
indirect pointers [0 ~ 4]
--------------------------------------
node footer
--------------------------------------
1. setxattr flow
- read_all_xattrs copies all the xattrs from inline and xattr node block.
- handle xattr entries
- write_all_xattrs copies modified xattrs into inline and xattr node block.
2. getxattr flow
- read_all_xattrs copies all the xattrs from inline and xattr node block.
- check target entries
3. Usage
# mount -t f2fs -o inline_xattr $DEV $MNT
Once mounted with the inline_xattr option, f2fs marks all the newly created
files to reserve an amount of inline xattr space explicitly inside the inode
block. Without the mount option, f2fs will not touch any existing files and
newly created files as well.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'include/linux/f2fs_fs.h')
-rw-r--r-- | include/linux/f2fs_fs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/f2fs_fs.h b/include/linux/f2fs_fs.h index 93e7020fb7a8..bb942f6d5702 100644 --- a/include/linux/f2fs_fs.h +++ b/include/linux/f2fs_fs.h @@ -140,7 +140,7 @@ struct f2fs_extent { } __packed; #define F2FS_NAME_LEN 255 -#define F2FS_INLINE_XATTR_ADDRS 0 /* 0 bytes for inline xattrs */ +#define F2FS_INLINE_XATTR_ADDRS 50 /* 200 bytes for inline xattrs */ #define DEF_ADDRS_PER_INODE 923 /* Address Pointers in an Inode */ #define ADDRS_PER_INODE(fi) addrs_per_inode(fi) #define ADDRS_PER_BLOCK 1018 /* Address Pointers in a Direct Block */ |