]> Git Repo - linux.git/commitdiff
f2fs: allow F2FS_IPU_NOCACHE for pinned file
authorJaegeuk Kim <[email protected]>
Sat, 14 Sep 2024 21:44:10 +0000 (21:44 +0000)
committerJaegeuk Kim <[email protected]>
Mon, 23 Sep 2024 15:42:13 +0000 (15:42 +0000)
This patch allows f2fs to submit bios of in-place writes on pinned file.

Reviewed-by: Daeho Jeong <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
fs/f2fs/sysfs.c

index d18931b7b094554c4fd9fa472ec8c7e7de4154a9..c56e8c8739352337ecaedecba5c90e147c6a7f1e 100644 (file)
@@ -792,7 +792,8 @@ out:
        if (!strcmp(a->attr.name, "ipu_policy")) {
                if (t >= BIT(F2FS_IPU_MAX))
                        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;
                SM_I(sbi)->ipu_policy = (unsigned int)t;
                return count;
This page took 0.059188 seconds and 4 git commands to generate.