Commit 48b230a583965d33c32b4e3c29a1e5e15d7e55de

Authored by Chao Yu
Committed by Jaegeuk Kim
1 parent 3a8861e271

f2fs: fix wrong statistics of inline data

If we remove a file that has inline data after mount, our statistics turns to
inaccurate.

cat /sys/kernel/debug/f2fs/status
  - Inline_data Inode: 4294967295

Let's add stat_inc_inline_inode() to stat inline info of the file when lookup.

Change log from v1:
 o stat in f2fs_lookup() instead of in do_read_inode() for excluding wrong stat.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>

Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff

... ... @@ -207,6 +207,8 @@
207 207 inode = f2fs_iget(dir->i_sb, ino);
208 208 if (IS_ERR(inode))
209 209 return ERR_CAST(inode);
  210 +
  211 + stat_inc_inline_inode(inode);
210 212 }
211 213  
212 214 return d_splice_alias(inode, dentry);