aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2017-09-04 18:58:29 +0800
committerJaegeuk Kim <jaegeuk@google.com>2017-11-13 11:17:49 -0800
commit97168b7ad427302967c9b95394f417aa0c39fffa (patch)
tree4683089d17b370855090a0aa6848f47fcd8d55f6 /lib
parentaf3689f18aee728d6f1e0672da2b26c3cf93975d (diff)
downloadandroid_external_f2fs-tools-97168b7ad427302967c9b95394f417aa0c39fffa.tar.gz
android_external_f2fs-tools-97168b7ad427302967c9b95394f417aa0c39fffa.tar.bz2
android_external_f2fs-tools-97168b7ad427302967c9b95394f417aa0c39fffa.zip
f2fs-tools: support flexible inline xattr size
This patch makes mkfs to support flexible inline xattr feature, also this enables fsck to recognize new disk-layout of inode which be of flexible inline xattr size. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libf2fs.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/libf2fs.c b/lib/libf2fs.c
index 3c0465c..69f5ccc 100644
--- a/lib/libf2fs.c
+++ b/lib/libf2fs.c
@@ -456,9 +456,7 @@ f2fs_hash_t f2fs_dentry_hash(const unsigned char *name, int len)
unsigned int addrs_per_inode(struct f2fs_inode *i)
{
- if (i->i_inline & F2FS_INLINE_XATTR)
- return CUR_ADDRS_PER_INODE(i) - F2FS_INLINE_XATTR_ADDRS;
- return CUR_ADDRS_PER_INODE(i);
+ return CUR_ADDRS_PER_INODE(i) - get_inline_xattr_addrs(i);
}
/*