summaryrefslogtreecommitdiff
path: root/fs/f2fs/data.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2017-12-08 03:25:39 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2018-01-23 01:56:35 +0300
commit1ad71a27124caf0b68ddd3c92be01aa2b2a72b2a (patch)
tree802af8c30b004b0a3c439a9b23d25a69b9aaef5e /fs/f2fs/data.c
parent9ac1e2d88d076aa1ae9e33d44a9bbc8ae3bfa791 (diff)
downloadlinux-1ad71a27124caf0b68ddd3c92be01aa2b2a72b2a.tar.xz
f2fs: add an ioctl to disable GC for specific file
This patch gives a flag to disable GC on given file, which would be useful, when user wants to keep its block map. It also conducts in-place-update for dontmove file. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/data.c')
-rw-r--r--fs/f2fs/data.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index cde2a3264b4c..945f15607484 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1479,6 +1479,8 @@ static inline bool need_inplace_update(struct f2fs_io_info *fio)
{
struct inode *inode = fio->page->mapping->host;
+ if (f2fs_is_pinned_file(inode))
+ return true;
if (S_ISDIR(inode->i_mode) || f2fs_is_atomic_file(inode))
return false;
if (is_cold_data(fio->page))