On 4/24/25 01:08, Eric Sandeen wrote:
> From: Hongbo Li
>
> At the parsing phase of mouont in the new mount api, options
> value will be recorded with the context, and then it will be
> used in fill_super and other helpers.
>
> Note that, this is a temporary status, we want remove the sb
> and s
On 4/24/25 01:08, Eric Sandeen wrote:
> From: Hongbo Li
>
> At the parsing phase of the new mount api, sbi will not be
> available. So here allows sbi to be NULL in f2fs log helpers
> and use that in handle_mount_opt().
>
> Signed-off-by: Hongbo Li
> [sandeen: forward port]
> Signed-off-by: Eri
On 4/24/25 01:08, Eric Sandeen wrote:
> From: Hongbo Li
>
> In handle_mount_opt, we use fs_parameter to parse each option.
> However we're still using the old API to get the options string.
> Using fsparams parse_options allows us to remove many of the Opt_
> enums, so remove them.
>
> The check
On 4/24/25 01:08, Eric Sandeen wrote:
> From: Hongbo Li
>
> Use an array of `fs_parameter_spec` called f2fs_param_specs to
> hold the mount option specifications for the new mount api.
>
> Add constant_table structures for several options to facilitate
> parsing.
>
> Signed-off-by: Hongbo Li
>
__write_node_folio can only return 0 or AOP_WRITEPAGE_ACTIVATE.
As part of phasing out AOP_WRITEPAGE_ACTIVATE, switch to a bool return
instead.
Signed-off-by: Christoph Hellwig
Reviewed-by: Chao Yu
---
fs/f2fs/node.c | 29 +
1 file changed, 13 insertions(+), 16 delet
Always assign ret where the error happens, and jump to out instead
of multiple loop exit conditions to prepare for changes in the
__write_node_folio calling convention.
Signed-off-by: Christoph Hellwig
---
fs/f2fs/node.c | 23 +++
1 file changed, 11 insertions(+), 12 deletion
Consolidate the code to unlock the page in f2fs_write_single_data_page
instead of leaving it to the callers for the AOP_WRITEPAGE_ACTIVATE case.
Replace AOP_WRITEPAGE_ACTIVATE with a positive return of 1 as this case
now doesn't match the historic ->writepage special return code that is
on it's way
__f2fs_write_meta_folio can only return 0 or AOP_WRITEPAGE_ACTIVATE.
As part of phasing out AOP_WRITEPAGE_ACTIVATE, switch to a bool return
instead.
Signed-off-by: Christoph Hellwig
Reviewed-by: Chao Yu
---
fs/f2fs/checkpoint.c | 22 +++---
1 file changed, 11 insertions(+), 11 d
Hi all,
this almost entirely cleans up usage of AOP_WRITEPAGE_ACTIVATE in f2fs.
Changes since v1:
- pick up the bug fix from Chao as patch 1
- release the folio batch on early exit
- remove the dead for_reclaim handling
- keep the ability of the caller to exit early for the redity case
Diffs
From: Chao Yu
If __write_node_folio() failed, it will return AOP_WRITEPAGE_ACTIVATE,
the incorrect return value may be passed to userspace in below path,
fix it.
- sync_filesystem
- sync_fs
- f2fs_issue_checkpoint
- block_operations
- f2fs_sync_node_pages
- __write_node_folio
Since commits 7ff0104a8052 ("f2fs: Remove f2fs_write_node_page()") and
3b47398d9861 ("f2fs: Remove f2fs_write_meta_page()'), f2fs can't be
called from reclaim context any more. Remove all code keyed of the
wbc->for_rename flag, which is now only set for writing out swap or
shmem pages inside the s
On 5/7/25 23:02, Jaegeuk Kim wrote:
> On 05/07, Eric Sandeen wrote:
>> On 5/7/25 6:26 AM, Chao Yu wrote:
>>> On 4/20/25 23:25, Eric Sandeen wrote:
From: Hongbo Li
In handle_mount_opt, we use fs_parameter to parse each option.
However we're still using the old API to get the opt
On 5/7/25 20:31, Eric Sandeen wrote:
> On 5/7/25 6:26 AM, Chao Yu wrote:
>> On 4/20/25 23:25, Eric Sandeen wrote:
>>> From: Hongbo Li
>>>
>>> In handle_mount_opt, we use fs_parameter to parse each option.
>>> However we're still using the old API to get the options string.
>>> Using fsparams parse
On 2025/4/24 1:08, Eric Sandeen wrote:
From: Hongbo Li
Use an array of `fs_parameter_spec` called f2fs_param_specs to
hold the mount option specifications for the new mount api.
Add constant_table structures for several options to facilitate
parsing.
Signed-off-by: Hongbo Li
[sandeen: for
On 05/07, Eric Sandeen wrote:
> On 5/7/25 2:48 PM, Jaegeuk Kim wrote:
> > On 05/07, Eric Sandeen wrote:
> >> On 5/7/25 9:46 AM, Jaegeuk Kim wrote:
> >>
> >>> I meant:
> >>>
> >>> # mkfs/mkfs.f2fs -c /dev/v...@vdc.file /dev/vdb
> >>> # mount /dev/vdb mnt
> >>>
> >>> It's supposed to be successful, s
On 05/07, Eric Sandeen wrote:
> On 5/7/25 3:28 PM, Jaegeuk Kim wrote:
> >> But as far as I can tell, at least for the extent cache, remount is handled
> >> properly already (with the hunk above):
> >>
> >> # mkfs/mkfs.f2fs -c /dev/v...@vdc.file /dev/vdb
> >> # mount /dev/vdb mnt
> >> # mount -o rem
On 5/7/25 3:28 PM, Jaegeuk Kim wrote:
>> But as far as I can tell, at least for the extent cache, remount is handled
>> properly already (with the hunk above):
>>
>> # mkfs/mkfs.f2fs -c /dev/v...@vdc.file /dev/vdb
>> # mount /dev/vdb mnt
>> # mount -o remount,noextent_cache mnt
>> mount: /root/mnt:
On 5/7/25 2:48 PM, Jaegeuk Kim wrote:
> On 05/07, Eric Sandeen wrote:
>> On 5/7/25 9:46 AM, Jaegeuk Kim wrote:
>>
>>> I meant:
>>>
>>> # mkfs/mkfs.f2fs -c /dev/v...@vdc.file /dev/vdb
>>> # mount /dev/vdb mnt
>>>
>>> It's supposed to be successful, since extent_cache is enabled by default.
>>
>> I'm
On 05/07, Eric Sandeen wrote:
> On 5/7/25 9:46 AM, Jaegeuk Kim wrote:
>
> > I meant:
> >
> > # mkfs/mkfs.f2fs -c /dev/v...@vdc.file /dev/vdb
> > # mount /dev/vdb mnt
> >
> > It's supposed to be successful, since extent_cache is enabled by default.
>
> I'm sorry, clearly I was too sleepy last ni
On Tue, May 6, 2025 at 8:17 PM Chao Yu wrote:
>
> On 5/7/25 04:25, Daeho Jeong wrote:
> > On Tue, May 6, 2025 at 12:05 AM Chao Yu via Linux-f2fs-devel
> > wrote:
> >>
> >> This is a regression testcase to check whether we will handle database
> >> inode dirty status correctly:
> >> 1. mount f2fs
On 5/7/25 9:46 AM, Jaegeuk Kim wrote:
> I meant:
>
> # mkfs/mkfs.f2fs -c /dev/v...@vdc.file /dev/vdb
> # mount /dev/vdb mnt
>
> It's supposed to be successful, since extent_cache is enabled by default.
I'm sorry, clearly I was too sleepy last night. This fixes it for me.
We have to test the ma
On 05/07, Eric Sandeen wrote:
> On 5/7/25 6:26 AM, Chao Yu wrote:
> > On 4/20/25 23:25, Eric Sandeen wrote:
> >> From: Hongbo Li
> >>
> >> In handle_mount_opt, we use fs_parameter to parse each option.
> >> However we're still using the old API to get the options string.
> >> Using fsparams parse_
On 05/06, Eric Sandeen wrote:
> On 5/6/25 9:56 PM, Eric Sandeen wrote:
> > On 5/6/25 8:23 PM, Jaegeuk Kim wrote:
>
> ...
>
> >> What about:
> >> # mount -o loop,noextent_cache f2fsfile.img mnt
> >>
> >> In this case, 1) ctx_clear_opt(), 2) set_opt() in default_options,
> >> 3) clear_opt since mas
On 5/7/25 6:26 AM, Chao Yu wrote:
> On 4/20/25 23:25, Eric Sandeen wrote:
>> From: Hongbo Li
>>
>> In handle_mount_opt, we use fs_parameter to parse each option.
>> However we're still using the old API to get the options string.
>> Using fsparams parse_options allows us to remove many of the Opt_
On 5/7/25 15:31, Dan Carpenter wrote:
> On Wed, May 07, 2025 at 10:59:11AM +0800, Chao Yu wrote:
>> On 5/2/25 16:15, Dan Carpenter wrote:
>>> Hello Matthew Wilcox (Oracle),
>>>
>>> 1768 /* reference all summary page */
>>> 1769 while (segno < end_segno) {
>>> 1770
On 4/20/25 23:25, Eric Sandeen wrote:
> From: Hongbo Li
>
> At the parsing phase of the new mount api, sbi will not be
> available. So here allows sbi to be NULL in f2fs log helpers
> and use that in handle_mount_opt().
>
> Signed-off-by: Hongbo Li
> [sandeen: forward port]
> Signed-off-by: Eri
On 5/7/25 12:30, yohan.joung wrote:
> when performing buffered writes in a large section,
> overhead is incurred due to the iteration through
> ckpt_valid_blocks within the section.
> when SEGS_PER_SEC is 128, this overhead accounts for 20% within
> the f2fs_write_single_data_page routine.
> as the
On 4/20/25 23:25, Eric Sandeen wrote:
> From: Hongbo Li
>
> In handle_mount_opt, we use fs_parameter to parse each option.
> However we're still using the old API to get the options string.
> Using fsparams parse_options allows us to remove many of the Opt_
> enums, so remove them.
>
> The check
active_logs, inline_xattr_size, f2fs_fault_info.inject_rate in struct
f2fs_mount_info should never be negative, change its type from int to
unsigned int.
Signed-off-by: Chao Yu
---
fs/f2fs/f2fs.h | 12 ++--
fs/f2fs/inode.c | 2 +-
fs/f2fs/super.c | 8
3 files changed, 11 inse
On 4/20/25 23:25, Eric Sandeen wrote:
> From: Hongbo Li
>
> Use an array of `fs_parameter_spec` called f2fs_param_specs to
> hold the mount option specifications for the new mount api.
>
> Add constant_table structures for several options to facilitate
> parsing.
>
> Signed-off-by: Hongbo Li
>
>On 5/7/25 12:30, yohan.joung wrote:
>> when performing buffered writes in a large section,
>> overhead is incurred due to the iteration through
>> ckpt_valid_blocks within the section.
>> when SEGS_PER_SEC is 128, this overhead accounts for 20% within
>> the f2fs_write_single_data_page routine.
>>
On 5/7/25 12:30, yohan.joung wrote:
> In LFS mode, the previous segment cannot use invalid blocks,
> so the remaining blocks from the next_blkoff of the current segment
> to the end of the section are calculated.
>
> Signed-off-by: yohan.joung
> ---
> fs/f2fs/segment.h | 23 +++--
On 5/7/25 15:48, Christoph Hellwig wrote:
> On Wed, May 07, 2025 at 03:38:20PM +0800, Chao Yu wrote:
>> On 5/5/25 17:25, Christoph Hellwig wrote:
>>> Hi all,
>>>
>>> this almost entirely cleans up usage of AOP_WRITEPAGE_ACTIVATE in f2fs.
>>>
>>> f2fs_sync_node_pages can still return it in a way tha
If __write_node_folio() failed, it will return AOP_WRITEPAGE_ACTIVATE,
the incorrect return value may be passed to userspace in below path,
fix it.
- sync_filesystem
- sync_fs
- f2fs_issue_checkpoint
- block_operations
- f2fs_sync_node_pages
- __write_node_folio
: return AOP_WR
On Wed, May 07, 2025 at 03:38:20PM +0800, Chao Yu wrote:
> On 5/5/25 17:25, Christoph Hellwig wrote:
> > Hi all,
> >
> > this almost entirely cleans up usage of AOP_WRITEPAGE_ACTIVATE in f2fs.
> >
> > f2fs_sync_node_pages can still return it in a way that is not handled
> > by any caller and even
On 5/5/25 17:25, Christoph Hellwig wrote:
> Hi all,
>
> this almost entirely cleans up usage of AOP_WRITEPAGE_ACTIVATE in f2fs.
>
> f2fs_sync_node_pages can still return it in a way that is not handled
> by any caller and eventually is propagated to userspace. This does look
> like a bug and nee
On Wed, May 07, 2025 at 10:59:11AM +0800, Chao Yu wrote:
> On 5/2/25 16:15, Dan Carpenter wrote:
> > Hello Matthew Wilcox (Oracle),
> >
> > 1768 /* reference all summary page */
> > 1769 while (segno < end_segno) {
> > 1770 struct folio *sum_folio = f2fs
On 5/5/25 17:26, Christoph Hellwig wrote:
> __write_node_folio can only return 0 or AOP_WRITEPAGE_ACTIVATE.
> As part of phasing out AOP_WRITEPAGE_ACTIVATE, switch to a bool return
> instead.
>
> Signed-off-by: Christoph Hellwig
Reviewed-by: Chao Yu
Thanks,
__
On 5/5/25 17:26, Christoph Hellwig wrote:
> Always assign ret where the error happens, and jump to out instead
> of multiple loop exit conditions to prepare for changes in the
> __write_node_folio calling convention.
>
> Signed-off-by: Christoph Hellwig
> ---
> fs/f2fs/node.c | 18 +-
On Wed, May 07, 2025 at 02:28:55PM +0800, Chao Yu wrote:
> > diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
> > index e016b0f96313..ce63b3bfb28f 100644
> > --- a/fs/f2fs/compress.c
> > +++ b/fs/f2fs/compress.c
> > @@ -1565,10 +1565,7 @@ static int f2fs_write_raw_pages(struct compress_ctx
> >
On 5/7/25 14:44, Christoph Hellwig wrote:
> On Wed, May 07, 2025 at 02:28:55PM +0800, Chao Yu wrote:
>>> diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
>>> index e016b0f96313..ce63b3bfb28f 100644
>>> --- a/fs/f2fs/compress.c
>>> +++ b/fs/f2fs/compress.c
>>> @@ -1565,10 +1565,7 @@ static int f
41 matches
Mail list logo