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 <[email protected]>
> > Signed-off-by: Jaegeuk Kim <[email protected]>
> > ---
> > 
> >   - 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)) {


_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to