All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] f2fs: zone: fix to don't trigger OPU on pinfile for direct IO
@ 2024-04-28  1:12 ` Chao Yu
  0 siblings, 0 replies; 6+ messages in thread
From: Chao Yu @ 2024-04-28  1:12 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, Chao Yu, Daeho Jeong

Otherwise, it breaks pinfile's sematics.

Cc: Daeho Jeong <daeho43@gmail.com>
Signed-off-by: Chao Yu <chao@kernel.org>
---
v2:
- fix to disallow OPU on pinfile no matter what device type f2fs uses.
 fs/f2fs/data.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index d8e4434e8801..56600dd43834 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1595,8 +1595,9 @@ int f2fs_map_blocks(struct inode *inode, struct f2fs_map_blocks *map, int flag)
 	}
 
 	/* use out-place-update for direct IO under LFS mode */
-	if (map->m_may_create &&
-	    (is_hole || (f2fs_lfs_mode(sbi) && flag == F2FS_GET_BLOCK_DIO))) {
+	if (map->m_may_create && (is_hole ||
+		(flag == F2FS_GET_BLOCK_DIO && f2fs_lfs_mode(sbi) &&
+		!f2fs_is_pinned_file(inode)))) {
 		if (unlikely(f2fs_cp_error(sbi))) {
 			err = -EIO;
 			goto sync_out;
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [f2fs-dev] [PATCH v2] f2fs: zone: fix to don't trigger OPU on pinfile for direct IO
@ 2024-04-28  1:12 ` Chao Yu
  0 siblings, 0 replies; 6+ messages in thread
From: Chao Yu @ 2024-04-28  1:12 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-kernel, linux-f2fs-devel

Otherwise, it breaks pinfile's sematics.

Cc: Daeho Jeong <daeho43@gmail.com>
Signed-off-by: Chao Yu <chao@kernel.org>
---
v2:
- fix to disallow OPU on pinfile no matter what device type f2fs uses.
 fs/f2fs/data.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index d8e4434e8801..56600dd43834 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1595,8 +1595,9 @@ int f2fs_map_blocks(struct inode *inode, struct f2fs_map_blocks *map, int flag)
 	}
 
 	/* use out-place-update for direct IO under LFS mode */
-	if (map->m_may_create &&
-	    (is_hole || (f2fs_lfs_mode(sbi) && flag == F2FS_GET_BLOCK_DIO))) {
+	if (map->m_may_create && (is_hole ||
+		(flag == F2FS_GET_BLOCK_DIO && f2fs_lfs_mode(sbi) &&
+		!f2fs_is_pinned_file(inode)))) {
 		if (unlikely(f2fs_cp_error(sbi))) {
 			err = -EIO;
 			goto sync_out;
-- 
2.40.1



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [f2fs-dev] [PATCH v2] f2fs: zone: fix to don't trigger OPU on pinfile for direct IO
  2024-04-28  1:12 ` [f2fs-dev] " Chao Yu
@ 2024-04-28  1:17   ` Daeho Jeong
  -1 siblings, 0 replies; 6+ messages in thread
From: Daeho Jeong @ 2024-04-28  1:17 UTC (permalink / raw)
  To: Chao Yu; +Cc: jaegeuk, linux-kernel, linux-f2fs-devel

On Sat, Apr 27, 2024 at 6:12 PM Chao Yu <chao@kernel.org> wrote:
>
> Otherwise, it breaks pinfile's sematics.
>
> Cc: Daeho Jeong <daeho43@gmail.com>
> Signed-off-by: Chao Yu <chao@kernel.org>
> ---
> v2:
> - fix to disallow OPU on pinfile no matter what device type f2fs uses.
>  fs/f2fs/data.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> index d8e4434e8801..56600dd43834 100644
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -1595,8 +1595,9 @@ int f2fs_map_blocks(struct inode *inode, struct f2fs_map_blocks *map, int flag)
>         }
>
>         /* use out-place-update for direct IO under LFS mode */
> -       if (map->m_may_create &&
> -           (is_hole || (f2fs_lfs_mode(sbi) && flag == F2FS_GET_BLOCK_DIO))) {
> +       if (map->m_may_create && (is_hole ||
> +               (flag == F2FS_GET_BLOCK_DIO && f2fs_lfs_mode(sbi) &&
> +               !f2fs_is_pinned_file(inode)))) {
>                 if (unlikely(f2fs_cp_error(sbi))) {
>                         err = -EIO;
>                         goto sync_out;
> --
> 2.40.1
>

Reviewed-by: Daeho Jeong <daehojeong@google.com>

Thanks,


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] f2fs: zone: fix to don't trigger OPU on pinfile for direct IO
@ 2024-04-28  1:17   ` Daeho Jeong
  0 siblings, 0 replies; 6+ messages in thread
From: Daeho Jeong @ 2024-04-28  1:17 UTC (permalink / raw)
  To: Chao Yu; +Cc: jaegeuk, linux-f2fs-devel, linux-kernel

On Sat, Apr 27, 2024 at 6:12 PM Chao Yu <chao@kernel.org> wrote:
>
> Otherwise, it breaks pinfile's sematics.
>
> Cc: Daeho Jeong <daeho43@gmail.com>
> Signed-off-by: Chao Yu <chao@kernel.org>
> ---
> v2:
> - fix to disallow OPU on pinfile no matter what device type f2fs uses.
>  fs/f2fs/data.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> index d8e4434e8801..56600dd43834 100644
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -1595,8 +1595,9 @@ int f2fs_map_blocks(struct inode *inode, struct f2fs_map_blocks *map, int flag)
>         }
>
>         /* use out-place-update for direct IO under LFS mode */
> -       if (map->m_may_create &&
> -           (is_hole || (f2fs_lfs_mode(sbi) && flag == F2FS_GET_BLOCK_DIO))) {
> +       if (map->m_may_create && (is_hole ||
> +               (flag == F2FS_GET_BLOCK_DIO && f2fs_lfs_mode(sbi) &&
> +               !f2fs_is_pinned_file(inode)))) {
>                 if (unlikely(f2fs_cp_error(sbi))) {
>                         err = -EIO;
>                         goto sync_out;
> --
> 2.40.1
>

Reviewed-by: Daeho Jeong <daehojeong@google.com>

Thanks,

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [f2fs-dev] [PATCH v2] f2fs: zone: fix to don't trigger OPU on pinfile for direct IO
  2024-04-28  1:12 ` [f2fs-dev] " Chao Yu
@ 2024-05-11  0:50   ` patchwork-bot+f2fs
  -1 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+f2fs @ 2024-05-11  0:50 UTC (permalink / raw)
  To: Chao Yu; +Cc: jaegeuk, linux-kernel, linux-f2fs-devel

Hello:

This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:

On Sun, 28 Apr 2024 09:12:36 +0800 you wrote:
> Otherwise, it breaks pinfile's sematics.
> 
> Cc: Daeho Jeong <daeho43@gmail.com>
> Signed-off-by: Chao Yu <chao@kernel.org>
> ---
> v2:
> - fix to disallow OPU on pinfile no matter what device type f2fs uses.
>  fs/f2fs/data.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Here is the summary with links:
  - [f2fs-dev,v2] f2fs: zone: fix to don't trigger OPU on pinfile for direct IO
    https://git.kernel.org/jaegeuk/f2fs/c/48d180e2bf5a

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [f2fs-dev] [PATCH v2] f2fs: zone: fix to don't trigger OPU on pinfile for direct IO
@ 2024-05-11  0:50   ` patchwork-bot+f2fs
  0 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+f2fs @ 2024-05-11  0:50 UTC (permalink / raw)
  To: Chao Yu; +Cc: jaegeuk, linux-kernel, linux-f2fs-devel

Hello:

This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:

On Sun, 28 Apr 2024 09:12:36 +0800 you wrote:
> Otherwise, it breaks pinfile's sematics.
> 
> Cc: Daeho Jeong <daeho43@gmail.com>
> Signed-off-by: Chao Yu <chao@kernel.org>
> ---
> v2:
> - fix to disallow OPU on pinfile no matter what device type f2fs uses.
>  fs/f2fs/data.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Here is the summary with links:
  - [f2fs-dev,v2] f2fs: zone: fix to don't trigger OPU on pinfile for direct IO
    https://git.kernel.org/jaegeuk/f2fs/c/48d180e2bf5a

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html




_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-05-11  0:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-28  1:12 [PATCH v2] f2fs: zone: fix to don't trigger OPU on pinfile for direct IO Chao Yu
2024-04-28  1:12 ` [f2fs-dev] " Chao Yu
2024-04-28  1:17 ` Daeho Jeong
2024-04-28  1:17   ` Daeho Jeong
2024-05-11  0:50 ` [f2fs-dev] " patchwork-bot+f2fs
2024-05-11  0:50   ` patchwork-bot+f2fs

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.