public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] f2fs: do not support mmap write for large folio
@ 2026-04-06 15:49 Jaegeuk Kim
  2026-04-06 15:57 ` [f2fs-dev] " Daeho Jeong
  2026-04-07  5:17 ` Christoph Hellwig
  0 siblings, 2 replies; 5+ messages in thread
From: Jaegeuk Kim @ 2026-04-06 15:49 UTC (permalink / raw)
  To: linux-kernel, linux-f2fs-devel; +Cc: Jaegeuk Kim

Let's check mmmap writes onto the large folio.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 2c4880f24b54..edfc3a374c40 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -82,7 +82,7 @@ static vm_fault_t f2fs_vm_page_mkwrite(struct vm_fault *vmf)
 	int err = 0;
 	vm_fault_t ret;
 
-	if (unlikely(IS_IMMUTABLE(inode)))
+	if (mapping_large_folio_support(inode->i_mapping))
 		return VM_FAULT_SIGBUS;
 
 	if (is_inode_flag_set(inode, FI_COMPRESS_RELEASED)) {
-- 
2.53.0.1213.gd9a14994de-goog


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

* Re: [f2fs-dev] [PATCH] f2fs: do not support mmap write for large folio
  2026-04-06 15:49 [PATCH] f2fs: do not support mmap write for large folio Jaegeuk Kim
@ 2026-04-06 15:57 ` Daeho Jeong
  2026-04-06 16:57   ` Jaegeuk Kim
  2026-04-07  5:17 ` Christoph Hellwig
  1 sibling, 1 reply; 5+ messages in thread
From: Daeho Jeong @ 2026-04-06 15:57 UTC (permalink / raw)
  To: Jaegeuk Kim; +Cc: linux-kernel, linux-f2fs-devel

On Mon, Apr 6, 2026 at 8:56 AM Jaegeuk Kim via Linux-f2fs-devel
<linux-f2fs-devel@lists.sourceforge.net> wrote:
>
> Let's check mmmap writes onto the large folio.

typo? mmap?

>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
>  fs/f2fs/file.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
> index 2c4880f24b54..edfc3a374c40 100644
> --- a/fs/f2fs/file.c
> +++ b/fs/f2fs/file.c
> @@ -82,7 +82,7 @@ static vm_fault_t f2fs_vm_page_mkwrite(struct vm_fault *vmf)
>         int err = 0;
>         vm_fault_t ret;
>
> -       if (unlikely(IS_IMMUTABLE(inode)))

Did you remove this intentionally?

> +       if (mapping_large_folio_support(inode->i_mapping))
>                 return VM_FAULT_SIGBUS;
>
>         if (is_inode_flag_set(inode, FI_COMPRESS_RELEASED)) {
> --
> 2.53.0.1213.gd9a14994de-goog
>
>
>
> _______________________________________________
> 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] 5+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: do not support mmap write for large folio
  2026-04-06 15:57 ` [f2fs-dev] " Daeho Jeong
@ 2026-04-06 16:57   ` Jaegeuk Kim
  0 siblings, 0 replies; 5+ messages in thread
From: Jaegeuk Kim @ 2026-04-06 16:57 UTC (permalink / raw)
  To: Daeho Jeong; +Cc: linux-kernel, linux-f2fs-devel

On 04/06, Daeho Jeong wrote:
> On Mon, Apr 6, 2026 at 8:56 AM Jaegeuk Kim via Linux-f2fs-devel
> <linux-f2fs-devel@lists.sourceforge.net> wrote:
> >
> > Let's check mmmap writes onto the large folio.
> 
> typo? mmap?
> 
> >
> > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> > ---
> >  fs/f2fs/file.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
> > index 2c4880f24b54..edfc3a374c40 100644
> > --- a/fs/f2fs/file.c
> > +++ b/fs/f2fs/file.c
> > @@ -82,7 +82,7 @@ static vm_fault_t f2fs_vm_page_mkwrite(struct vm_fault *vmf)
> >         int err = 0;
> >         vm_fault_t ret;
> >
> > -       if (unlikely(IS_IMMUTABLE(inode)))
> 
> Did you remove this intentionally?

Ah, let me remain it back to isolate the change.

> 
> > +       if (mapping_large_folio_support(inode->i_mapping))
> >                 return VM_FAULT_SIGBUS;
> >
> >         if (is_inode_flag_set(inode, FI_COMPRESS_RELEASED)) {
> > --
> > 2.53.0.1213.gd9a14994de-goog
> >
> >
> >
> > _______________________________________________
> > 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] 5+ messages in thread

* Re: [PATCH] f2fs: do not support mmap write for large folio
  2026-04-06 15:49 [PATCH] f2fs: do not support mmap write for large folio Jaegeuk Kim
  2026-04-06 15:57 ` [f2fs-dev] " Daeho Jeong
@ 2026-04-07  5:17 ` Christoph Hellwig
  2026-04-07 22:58   ` Jaegeuk Kim
  1 sibling, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2026-04-07  5:17 UTC (permalink / raw)
  To: Jaegeuk Kim; +Cc: linux-kernel, linux-mm

On Mon, Apr 06, 2026 at 03:49:40PM +0000, Jaegeuk Kim wrote:
> Let's check mmmap writes onto the large folio.

Why?  And how is this not breaking applications?

> 
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
>  fs/f2fs/file.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
> index 2c4880f24b54..edfc3a374c40 100644
> --- a/fs/f2fs/file.c
> +++ b/fs/f2fs/file.c
> @@ -82,7 +82,7 @@ static vm_fault_t f2fs_vm_page_mkwrite(struct vm_fault *vmf)
>  	int err = 0;
>  	vm_fault_t ret;
>  
> -	if (unlikely(IS_IMMUTABLE(inode)))
> +	if (mapping_large_folio_support(inode->i_mapping))
>  		return VM_FAULT_SIGBUS;
>  
>  	if (is_inode_flag_set(inode, FI_COMPRESS_RELEASED)) {
> -- 
> 2.53.0.1213.gd9a14994de-goog
> 
> 
---end quoted text---

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

* Re: [PATCH] f2fs: do not support mmap write for large folio
  2026-04-07  5:17 ` Christoph Hellwig
@ 2026-04-07 22:58   ` Jaegeuk Kim
  0 siblings, 0 replies; 5+ messages in thread
From: Jaegeuk Kim @ 2026-04-07 22:58 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-kernel, linux-mm

On 04/06, Christoph Hellwig wrote:
> On Mon, Apr 06, 2026 at 03:49:40PM +0000, Jaegeuk Kim wrote:
> > Let's check mmmap writes onto the large folio.
> 
> Why?  And how is this not breaking applications?

Since we only support the large folio on the read case.

> 
> > 
> > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> > ---
> >  fs/f2fs/file.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
> > index 2c4880f24b54..edfc3a374c40 100644
> > --- a/fs/f2fs/file.c
> > +++ b/fs/f2fs/file.c
> > @@ -82,7 +82,7 @@ static vm_fault_t f2fs_vm_page_mkwrite(struct vm_fault *vmf)
> >  	int err = 0;
> >  	vm_fault_t ret;
> >  
> > -	if (unlikely(IS_IMMUTABLE(inode)))
> > +	if (mapping_large_folio_support(inode->i_mapping))
> >  		return VM_FAULT_SIGBUS;
> >  
> >  	if (is_inode_flag_set(inode, FI_COMPRESS_RELEASED)) {
> > -- 
> > 2.53.0.1213.gd9a14994de-goog
> > 
> > 
> ---end quoted text---

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

end of thread, other threads:[~2026-04-07 22:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-06 15:49 [PATCH] f2fs: do not support mmap write for large folio Jaegeuk Kim
2026-04-06 15:57 ` [f2fs-dev] " Daeho Jeong
2026-04-06 16:57   ` Jaegeuk Kim
2026-04-07  5:17 ` Christoph Hellwig
2026-04-07 22:58   ` Jaegeuk Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox