Skip to content

Commit 755f182

Browse files
author
Jaegeuk Kim
committed
f2fs: allow F2FS_IPU_NOCACHE for pinned file
This patch allows f2fs to submit bios of in-place writes on pinned file. Reviewed-by: Daeho Jeong <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 5cc69a2 commit 755f182

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/f2fs/sysfs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,8 @@ static ssize_t __sbi_store(struct f2fs_attr *a,
792792
if (!strcmp(a->attr.name, "ipu_policy")) {
793793
if (t >= BIT(F2FS_IPU_MAX))
794794
return -EINVAL;
795-
if (t && f2fs_lfs_mode(sbi))
795+
/* allow F2FS_IPU_NOCACHE only for IPU in the pinned file */
796+
if (f2fs_lfs_mode(sbi) && (t & ~BIT(F2FS_IPU_NOCACHE)))
796797
return -EINVAL;
797798
SM_I(sbi)->ipu_policy = (unsigned int)t;
798799
return count;

0 commit comments

Comments
 (0)