diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-11-11 23:10:01 +0100 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-11-11 23:16:12 +0100 |
commit | 92dffd01790a5219d234fc83c3ba854f4490b7f4 (patch) | |
tree | 226fac18c0ac172e2bb6f9c966e03e9a8a8c81d9 /fs/f2fs/inline.c | |
parent | f2fs: fix deadlock to grab 0'th data page (diff) | |
download | linux-92dffd01790a5219d234fc83c3ba854f4490b7f4.tar.xz linux-92dffd01790a5219d234fc83c3ba854f4490b7f4.zip |
f2fs: convert inline_data when i_size becomes large
If i_size becomes large outside of MAX_INLINE_DATA, we shoud convert the inode.
Otherwise, we can make some dirty pages during the truncation, and those pages
will be written through f2fs_write_data_page.
At that moment, the inode has still inline_data, so that it tries to write non-
zero pages into inline_data area.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/inline.c')
-rw-r--r-- | fs/f2fs/inline.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c index 231067027745..053d114f0528 100644 --- a/fs/f2fs/inline.c +++ b/fs/f2fs/inline.c @@ -24,6 +24,9 @@ bool f2fs_may_inline(struct inode *inode) if (!S_ISREG(inode->i_mode)) return false; + if (i_size_read(inode) > MAX_INLINE_DATA) + return false; + return true; } |