Commit ae87b9c2 authored by Jaegeuk Kim's avatar Jaegeuk Kim

f2fs: allow F2FS_IPU_NOCACHE for pinned file

This patch allows f2fs to submit bios of in-place writes on pinned file.
Reviewed-by: default avatarDaeho Jeong <daehojeong@google.com>
Reviewed-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 5cc69a27
...@@ -792,7 +792,8 @@ static ssize_t __sbi_store(struct f2fs_attr *a, ...@@ -792,7 +792,8 @@ static ssize_t __sbi_store(struct f2fs_attr *a,
if (!strcmp(a->attr.name, "ipu_policy")) { if (!strcmp(a->attr.name, "ipu_policy")) {
if (t >= BIT(F2FS_IPU_MAX)) if (t >= BIT(F2FS_IPU_MAX))
return -EINVAL; return -EINVAL;
if (t && f2fs_lfs_mode(sbi)) /* allow F2FS_IPU_NOCACHE only for IPU in the pinned file */
if (f2fs_lfs_mode(sbi) && (t & ~BIT(F2FS_IPU_NOCACHE)))
return -EINVAL; return -EINVAL;
SM_I(sbi)->ipu_policy = (unsigned int)t; SM_I(sbi)->ipu_policy = (unsigned int)t;
return count; return count;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment