* [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
` (2 more replies)
0 siblings, 3 replies; 16+ 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] 16+ 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
2026-04-08 18:13 ` [PATCH v3] " Jaegeuk Kim
2 siblings, 1 reply; 16+ 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] 16+ 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; 16+ 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] 16+ 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
2026-04-08 18:13 ` [PATCH v3] " Jaegeuk Kim
2 siblings, 1 reply; 16+ 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] 16+ 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
2026-04-08 5:03 ` Christoph Hellwig
0 siblings, 1 reply; 16+ 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] 16+ messages in thread* Re: [PATCH] f2fs: do not support mmap write for large folio
2026-04-07 22:58 ` Jaegeuk Kim
@ 2026-04-08 5:03 ` Christoph Hellwig
2026-04-08 14:07 ` David Hildenbrand (Arm)
0 siblings, 1 reply; 16+ messages in thread
From: Christoph Hellwig @ 2026-04-08 5:03 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: Christoph Hellwig, linux-kernel, linux-mm
On Tue, Apr 07, 2026 at 10:58:11PM +0000, Jaegeuk Kim wrote:
> 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.
In general spelling such basic out in the commit log, and even comments
is really helpful. I'm curious how this works, though - by the time
you read a large folio you don't know if it will ever be written to.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] f2fs: do not support mmap write for large folio
2026-04-08 5:03 ` Christoph Hellwig
@ 2026-04-08 14:07 ` David Hildenbrand (Arm)
2026-04-08 18:08 ` Jaegeuk Kim
0 siblings, 1 reply; 16+ messages in thread
From: David Hildenbrand (Arm) @ 2026-04-08 14:07 UTC (permalink / raw)
To: Christoph Hellwig, Jaegeuk Kim; +Cc: linux-kernel, linux-mm
On 4/8/26 07:03, Christoph Hellwig wrote:
> On Tue, Apr 07, 2026 at 10:58:11PM +0000, Jaegeuk Kim wrote:
>> On 04/06, Christoph Hellwig wrote:
>>>
>>> Why? And how is this not breaking applications?
>>
>> Since we only support the large folio on the read case.
>
> In general spelling such basic out in the commit log, and even comments
> is really helpful. I'm curious how this works, though - by the time
> you read a large folio you don't know if it will ever be written to.
Why are only large folios supported for read?
Where is that allocation logic and how can that path even be triggered?
Also, usually we check for large folios by testing the actual folio, not
whether the mapping supports them?
--
Cheers,
David
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] f2fs: do not support mmap write for large folio
2026-04-08 14:07 ` David Hildenbrand (Arm)
@ 2026-04-08 18:08 ` Jaegeuk Kim
2026-04-13 19:22 ` David Hildenbrand (Arm)
0 siblings, 1 reply; 16+ messages in thread
From: Jaegeuk Kim @ 2026-04-08 18:08 UTC (permalink / raw)
To: David Hildenbrand (Arm); +Cc: Christoph Hellwig, linux-kernel, linux-mm
On 04/08, David Hildenbrand (Arm) wrote:
> On 4/8/26 07:03, Christoph Hellwig wrote:
> > On Tue, Apr 07, 2026 at 10:58:11PM +0000, Jaegeuk Kim wrote:
> >> On 04/06, Christoph Hellwig wrote:
> >>>
> >>> Why? And how is this not breaking applications?
> >>
> >> Since we only support the large folio on the read case.
> >
> > In general spelling such basic out in the commit log, and even comments
> > is really helpful. I'm curious how this works, though - by the time
> > you read a large folio you don't know if it will ever be written to.
>
> Why are only large folios supported for read?
>
> Where is that allocation logic and how can that path even be triggered?
>
> Also, usually we check for large folios by testing the actual folio, not
> whether the mapping supports them?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v7.0-rc7&id=05e65c14ea59a401cec4284e9d612f9d5dc1b3f8
Currently I think it's simple to check the mapping in our case.
>
> --
> Cheers,
>
> David
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] f2fs: do not support mmap write for large folio
2026-04-08 18:08 ` Jaegeuk Kim
@ 2026-04-13 19:22 ` David Hildenbrand (Arm)
0 siblings, 0 replies; 16+ messages in thread
From: David Hildenbrand (Arm) @ 2026-04-13 19:22 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: Christoph Hellwig, linux-kernel, linux-mm
On 4/8/26 20:08, Jaegeuk Kim wrote:
> On 04/08, David Hildenbrand (Arm) wrote:
>> On 4/8/26 07:03, Christoph Hellwig wrote:
>>>
>>> In general spelling such basic out in the commit log, and even comments
>>> is really helpful. I'm curious how this works, though - by the time
>>> you read a large folio you don't know if it will ever be written to.
>>
>> Why are only large folios supported for read?
>>
>> Where is that allocation logic and how can that path even be triggered?
>>
>> Also, usually we check for large folios by testing the actual folio, not
>> whether the mapping supports them?
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v7.0-rc7&id=05e65c14ea59a401cec4284e9d612f9d5dc1b3f8
>
> Currently I think it's simple to check the mapping in our case.
Thanks for the pointer.
So you are adding code for something that is impossible to be reached.
Reading the other discussions, I agree that this should be flagged
clearer as an assertion, and not a fix.
I'll let maintainers decide whether that is a assertion we should add :)
--
Cheers,
David
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v3] 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-08 18:13 ` Jaegeuk Kim
2026-04-09 5:40 ` Christoph Hellwig
` (2 more replies)
2 siblings, 3 replies; 16+ messages in thread
From: Jaegeuk Kim @ 2026-04-08 18:13 UTC (permalink / raw)
To: linux-kernel, linux-f2fs-devel
Let's check mmap writes onto the large folio, since we don't support writing
large folios.
Reviewed-by: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
- log v2:
: add comments
fs/f2fs/file.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 2c4880f24b54..c0220cd7b332 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -82,7 +82,12 @@ static vm_fault_t f2fs_vm_page_mkwrite(struct vm_fault *vmf)
int err = 0;
vm_fault_t ret;
- if (unlikely(IS_IMMUTABLE(inode)))
+ /*
+ * We only support large folio on the read case.
+ * Don't make any dirty pages.
+ */
+ if (unlikely(IS_IMMUTABLE(inode)) ||
+ 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] 16+ messages in thread* Re: [PATCH v3] f2fs: do not support mmap write for large folio
2026-04-08 18:13 ` [PATCH v3] " Jaegeuk Kim
@ 2026-04-09 5:40 ` Christoph Hellwig
2026-04-10 1:15 ` Jaegeuk Kim
2026-04-13 11:27 ` [f2fs-dev] " Chao Yu
2026-04-13 22:46 ` [PATCH v4] " Jaegeuk Kim
2 siblings, 1 reply; 16+ messages in thread
From: Christoph Hellwig @ 2026-04-09 5:40 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: linux-kernel, linux-f2fs-devel, linux-fsdevel, linux-mm
[adding back fsdevel and mm to the discussion]
On Wed, Apr 08, 2026 at 06:13:06PM +0000, Jaegeuk Kim wrote:
> Let's check mmap writes onto the large folio, since we don't support writing
> large folios.
What does this fix? As state in the previous round of discussion f2fs
only support large folios for immutable files, how do you get ->mkwrite
called for them.
The only way I can think of that is when clearing the immutable flag,
but simply rejecting writes with SIGBUS after that seems like it's
breaking the expected API, and I don't see handling for normal writes
after that either.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v3] f2fs: do not support mmap write for large folio
2026-04-09 5:40 ` Christoph Hellwig
@ 2026-04-10 1:15 ` Jaegeuk Kim
0 siblings, 0 replies; 16+ messages in thread
From: Jaegeuk Kim @ 2026-04-10 1:15 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-kernel, linux-f2fs-devel, linux-fsdevel, linux-mm
On 04/08, Christoph Hellwig wrote:
> [adding back fsdevel and mm to the discussion]
>
> On Wed, Apr 08, 2026 at 06:13:06PM +0000, Jaegeuk Kim wrote:
> > Let's check mmap writes onto the large folio, since we don't support writing
> > large folios.
>
> What does this fix? As state in the previous round of discussion f2fs
> only support large folios for immutable files, how do you get ->mkwrite
> called for them.
I'm approaching this as a safeguard first, since in any buggy case, this will
crash the filesystem.
>
> The only way I can think of that is when clearing the immutable flag,
> but simply rejecting writes with SIGBUS after that seems like it's
> breaking the expected API, and I don't see handling for normal writes
> after that either.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [f2fs-dev] [PATCH v3] f2fs: do not support mmap write for large folio
2026-04-08 18:13 ` [PATCH v3] " Jaegeuk Kim
2026-04-09 5:40 ` Christoph Hellwig
@ 2026-04-13 11:27 ` Chao Yu
2026-04-13 22:47 ` Jaegeuk Kim
2026-04-13 22:46 ` [PATCH v4] " Jaegeuk Kim
2 siblings, 1 reply; 16+ messages in thread
From: Chao Yu @ 2026-04-13 11:27 UTC (permalink / raw)
To: Jaegeuk Kim, linux-kernel, linux-f2fs-devel; +Cc: chao
On 4/9/2026 2:13 AM, Jaegeuk Kim via Linux-f2fs-devel wrote:
> Let's check mmap writes onto the large folio, since we don't support writing
> large folios.
>
> Reviewed-by: Daeho Jeong <daehojeong@google.com>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
>
> - log v2:
> : add comments
>
> fs/f2fs/file.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
> index 2c4880f24b54..c0220cd7b332 100644
> --- a/fs/f2fs/file.c
> +++ b/fs/f2fs/file.c
> @@ -82,7 +82,12 @@ static vm_fault_t f2fs_vm_page_mkwrite(struct vm_fault *vmf)
> int err = 0;
> vm_fault_t ret;
>
> - if (unlikely(IS_IMMUTABLE(inode)))
> + /*
> + * We only support large folio on the read case.
> + * Don't make any dirty pages.
> + */
> + if (unlikely(IS_IMMUTABLE(inode)) ||
> + mapping_large_folio_support(inode->i_mapping))
> return VM_FAULT_SIGBUS;
The code itself looks good, since it's an impossible case, should we
use f2fs_bug_on(, mapping_large_folio_support()) to catch any bug case
rather than just returning error here w/o log?
Thanks,
>
> if (is_inode_flag_set(inode, FI_COMPRESS_RELEASED)) {
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [f2fs-dev] [PATCH v3] f2fs: do not support mmap write for large folio
2026-04-13 11:27 ` [f2fs-dev] " Chao Yu
@ 2026-04-13 22:47 ` Jaegeuk Kim
0 siblings, 0 replies; 16+ messages in thread
From: Jaegeuk Kim @ 2026-04-13 22:47 UTC (permalink / raw)
To: Chao Yu; +Cc: linux-kernel, linux-f2fs-devel
On 04/13, Chao Yu wrote:
> On 4/9/2026 2:13 AM, Jaegeuk Kim via Linux-f2fs-devel wrote:
> > Let's check mmap writes onto the large folio, since we don't support writing
> > large folios.
> >
> > Reviewed-by: Daeho Jeong <daehojeong@google.com>
> > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> > ---
> >
> > - log v2:
> > : add comments
> >
> > fs/f2fs/file.c | 7 ++++++-
> > 1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
> > index 2c4880f24b54..c0220cd7b332 100644
> > --- a/fs/f2fs/file.c
> > +++ b/fs/f2fs/file.c
> > @@ -82,7 +82,12 @@ static vm_fault_t f2fs_vm_page_mkwrite(struct vm_fault *vmf)
> > int err = 0;
> > vm_fault_t ret;
> > - if (unlikely(IS_IMMUTABLE(inode)))
> > + /*
> > + * We only support large folio on the read case.
> > + * Don't make any dirty pages.
> > + */
> > + if (unlikely(IS_IMMUTABLE(inode)) ||
> > + mapping_large_folio_support(inode->i_mapping))
> > return VM_FAULT_SIGBUS;
>
> The code itself looks good, since it's an impossible case, should we
> use f2fs_bug_on(, mapping_large_folio_support()) to catch any bug case
> rather than just returning error here w/o log?
Instead of kernel panicing for the production, I'd leave a kernel message first.
>
> Thanks,
>
> > if (is_inode_flag_set(inode, FI_COMPRESS_RELEASED)) {
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v4] f2fs: do not support mmap write for large folio
2026-04-08 18:13 ` [PATCH v3] " Jaegeuk Kim
2026-04-09 5:40 ` Christoph Hellwig
2026-04-13 11:27 ` [f2fs-dev] " Chao Yu
@ 2026-04-13 22:46 ` Jaegeuk Kim
2026-04-14 8:23 ` [f2fs-dev] " Chao Yu
2 siblings, 1 reply; 16+ messages in thread
From: Jaegeuk Kim @ 2026-04-13 22:46 UTC (permalink / raw)
To: linux-kernel, linux-f2fs-devel
Let's check mmap writes onto the large folio, since we don't support writing
large folios.
Reviewed-by: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
- add f2fs_err to catch any issue
fs/f2fs/file.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 2c4880f24b54..e917342cb828 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -82,8 +82,17 @@ static vm_fault_t f2fs_vm_page_mkwrite(struct vm_fault *vmf)
int err = 0;
vm_fault_t ret;
- if (unlikely(IS_IMMUTABLE(inode)))
+ /*
+ * We only support large folio on the read case.
+ * Don't make any dirty pages.
+ */
+ if (unlikely(IS_IMMUTABLE(inode)) ||
+ mapping_large_folio_support(inode->i_mapping)) {
+ f2fs_err(sbi, "Not expected: immutable: %d large_folio: %d",
+ IS_IMMUTABLE(inode),
+ mapping_large_folio_support(inode->i_mapping));
return VM_FAULT_SIGBUS;
+ }
if (is_inode_flag_set(inode, FI_COMPRESS_RELEASED)) {
err = -EIO;
--
2.54.0.rc0.605.g598a273b03-goog
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [f2fs-dev] [PATCH v4] f2fs: do not support mmap write for large folio
2026-04-13 22:46 ` [PATCH v4] " Jaegeuk Kim
@ 2026-04-14 8:23 ` Chao Yu
0 siblings, 0 replies; 16+ messages in thread
From: Chao Yu @ 2026-04-14 8:23 UTC (permalink / raw)
To: Jaegeuk Kim, linux-kernel, linux-f2fs-devel; +Cc: chao
On 4/14/2026 6:46 AM, Jaegeuk Kim via Linux-f2fs-devel wrote:
> Let's check mmap writes onto the large folio, since we don't support writing
> large folios.
>
> Reviewed-by: Daeho Jeong <daehojeong@google.com>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2026-04-14 8:23 UTC | newest]
Thread overview: 16+ 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
2026-04-08 5:03 ` Christoph Hellwig
2026-04-08 14:07 ` David Hildenbrand (Arm)
2026-04-08 18:08 ` Jaegeuk Kim
2026-04-13 19:22 ` David Hildenbrand (Arm)
2026-04-08 18:13 ` [PATCH v3] " Jaegeuk Kim
2026-04-09 5:40 ` Christoph Hellwig
2026-04-10 1:15 ` Jaegeuk Kim
2026-04-13 11:27 ` [f2fs-dev] " Chao Yu
2026-04-13 22:47 ` Jaegeuk Kim
2026-04-13 22:46 ` [PATCH v4] " Jaegeuk Kim
2026-04-14 8:23 ` [f2fs-dev] " Chao Yu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox