__lookup_nat_cache follows LRU manner to move clean nat entry, when nat
entries are going to be dirty, no need to move them to tail of lru list.
Introduce a parameter 'for_dirty' to avoid it.
Signed-off-by: wangzijie
---
v3:
- followed by Chao's suggestion to update comments
v2
When we need to alloc nat entry and set it dirty, we can directly add it to
dirty set list(or initialize its list_head for new_ne) instead of adding it
to clean list and make a move. Introduce init_dirty flag to do it.
Signed-off-by: wangzijie
---
v3:
- followed by Chao's suggestion to cle
> On 7/22/25 22:36, wangzijie wrote:
> > When we need to alloc nat entry and set it dirty, we can directly add it to
> > dirty set list(or initialize its list_head for new_ne) instead of adding it
> > to clean list and make a move. Introduce init_dirty flag to do it.
&
> On 7/22/25 22:36, wangzijie wrote:
> > __lookup_nat_cache follows LRU manner to move clean nat entry, when nat
> > entries are going to be dirty, no need to move them to tail of lru list.
> > Introduce a parameter 'for_dirty' to avoid it.
> >
> &g
__lookup_nat_cache follows LRU manner to move clean nat entry, when nat
entries are going to be dirty, no need to move them to tail of lru list.
Introduce a parameter 'for_dirty' to avoid it.
Signed-off-by: wangzijie
---
v2:
- followed by Jaegeuk's suggestion to add
When we need to alloc nat entry and set it dirty, we can directly add it to
dirty set list(or initialize its list_head for new_ne) instead of adding it
to clean list and make a move. Introduce init_dirty flag to do it.
Signed-off-by: wangzijie
---
fs/f2fs/node.c | 37
When we need to alloc nat entry and set it dirty, we can directly add it to
dirty set list(or initialize its list_head for new_ne) instead of adding it
to clean list and make a move. Introduce init_dirty flag to do it.
Signed-off-by: wangzijie
---
fs/f2fs/node.c | 37
__lookup_nat_cache follows LRU manner to move clean nat entry, when nat
entries are going to be dirty, no need to move them to tail of lru list.
Signed-off-by: wangzijie
---
fs/f2fs/node.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
1-wangzij...@honor.com/
https://lore.kernel.org/linux-f2fs-devel/20250624035938.3176350-2-wangzij...@honor.com/
>On 06/30, wangzijie wrote:
>> To prevent scattered pin block generation, don't allow non-section aligned
>> truncation
>> to smaller or equal size on pinned
to pinned file, so we don't need to consider
attr->ia_size > i_size case.
In addition, xfstests #494 assumes truncation on active swapfile(pinned) will
return
ETXTBSY by setattr_prepare() -> inode_newsize_ok(), so we relocate this check
after
setattr_prepare().
Signed-off-by: wang
Introduce sbi in f2fs_setattr() and convert F2FS_I_SB to it. No logic
change, just cleanup and prepare to get CAP_BLKS_PER_SEC(sbi).
Signed-off-by: wangzijie
---
fs/f2fs/file.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
>On 6/24/25 11:59, wangzijie wrote:
>> To prevent scattered pin block generation, don't allow non-section aligned
>> truncation
>> to smaller or equal size on pinned file. But for truncation to larger size,
>> after
>> commit 3fdd89b452c2("f2fs: pre
Introduce sbi in f2fs_setattr() and convert F2FS_I_SB to it. No logic
change, just cleanup and prepare to get CAP_BLKS_PER_SEC(sbi).
Signed-off-by: wangzijie
---
fs/f2fs/file.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
to pinned file, so we don't need to consider
attr->ia_size > i_size case.
Signed-off-by: wangzijie
---
v4:
- convert sbi first and apply change
---
fs/f2fs/file.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 209f43653..4809
After introduce sbi in f2fs_setattr(), cleanup F2FS_I_SB. No logic change.
Signed-off-by: wangzijie
---
fs/f2fs/file.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 9e0f1c98f..4809f0fd6 100644
--- a/fs/f2fs/file.c
+++ b
to pinned file, so we don't need to consider
attr->ia_size > i_size case.
Signed-off-by: wangzijie
---
v3:
- cover attr->ia_size == i_size case
v2:
- add comments and change a proper subject
---
fs/f2fs/file.c | 12
1 file changed, 12 insertions(+)
diff --git a/fs
ly support overwrite IO to pinned file, so we don't need to consider
> attr->ia_size > i_size case.
>
> Signed-off-by: wangzijie
> ---
> v2:
> - add comments and change a proper subject
> ---
> fs/f2fs/file.c | 12
> 1 file changed, 12 insertions
After introduce sbi in f2fs_setattr(), cleanup F2FS_I_SB. No logic change.
Signed-off-by: wangzijie
---
fs/f2fs/file.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 09be6e849..3e610db59 100644
--- a/fs/f2fs/file.c
+++ b
ned file, so we don't need to consider
attr->ia_size > i_size case.
Signed-off-by: wangzijie
---
v2:
- add comments and change a proper subject
---
fs/f2fs/file.c | 12
1 file changed, 12 insertions(+)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 6bd3de64f..09be6e849 1
>On 6/17/25 15:36, wangzijie wrote:
>>> On 6/17/25 11:57, wangzijie wrote:
>>>> To prevent non-section-aligned size pinned file generated from truncation,
>>>> add check condition in setattr.
>>>>
>>>> Signed-off-by: wangzijie
>
> On 6/17/25 11:57, wangzijie wrote:
> > To prevent non-section-aligned size pinned file generated from truncation,
> > add check condition in setattr.
> >
> > Signed-off-by: wangzijie
> > ---
> > fs/f2fs/file.c | 6 ++
> > 1 file changed,
To prevent non-section-aligned size pinned file generated from truncation,
add check condition in setattr.
Signed-off-by: wangzijie
---
fs/f2fs/file.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 6bd3de64f..72f7d1b4a 100644
--- a/fs/f2fs/file.c
After introduce sbi in f2fs_setattr(), cleanup F2FS_I_SB. No logic change.
Signed-off-by: wangzijie
---
fs/f2fs/file.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 72f7d1b4a..4ca1c2dfc 100644
--- a/fs/f2fs/file.c
+++ b
To prevent non-section-aligned size pinned file generated from truncation,
add check condition in setattr. Meanwhile, clean up F2FS_I_SB.
Signed-off-by: wangzijie
---
fs/f2fs/file.c | 20 +---
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/fs/f2fs/file.c b/fs
to introduce this sysfs entry.
Reviewed-by: wangzijie
> ---
> v2:
> - assign SM_I(sbi)->ovp_segments after f2fs_build_segment_manager()
> Documentation/ABI/testing/sysfs-fs-f2fs | 9 +
> fs/f2fs/f2fs.h | 3 +++
> fs/f2fs/file.c
> This patch introduces /sys/fs/f2fs//reserved_pin_section for tuning
> @needed parameter of has_not_enough_free_secs(), if we configure it w/
> zero, it can avoid f2fs_gc() as much as possible while fallocating on
> pinned file.
>
> Signed-off-by: Chao Yu
> ---
> Documentation/ABI/testing/sysfs
>On 2025/6/12 20:34, wangzijie wrote:
>>> On 6/12/25 11:27, wangzijie wrote:
>>>> Wu Bo once mentioned a fallocate fail scenario in this link[1].
>>>> After commit 3fdd89b452c2("f2fs: prevent writing without fallocate()
>>>> for pinned files&quo
> On 6/12/25 11:27, wangzijie wrote:
> > Wu Bo once mentioned a fallocate fail scenario in this link[1].
> > After commit 3fdd89b452c2("f2fs: prevent writing without fallocate()
> > for pinned files"), we cannot directly generate 4K size file and
> > pin it,
an continue to allocate pinned section when gc happens EAGAIN. Even if we
don't have free section, f2fs_allocate_pinning_section() can fail with ENOSPC.
[1]
https://lore.kernel.org/linux-f2fs-devel/20231030094024.263707-1-bo...@vivo.com/t/#u
Signed-off-by: wangzijie
---
fs/f2fs/file.
>On 5/22/25 09:52, wangzijie wrote:
>> This patch add a ioctl to estimate compression gain. In user mode
>> compression, users can define
>> the interval between clusters for estimation sampling before compress and
>> release ioctl to a file.
>> This can h
.
Signed-off-by: wangqi
Signed-off-by: wangzijie
---
fs/f2fs/compress.c| 107 ++
fs/f2fs/f2fs.h| 5 ++
fs/f2fs/file.c| 38 +-
include/uapi/linux/f2fs.h | 8 +++
4 files changed, 157 insertions(+), 1 deletion
ee(xattrs) to free buffer properly.
[1]
https://lore.kernel.org/linux-f2fs-devel/502ae396-ae82-44d6-b08d-617e9e9c4...@oppo.com/
Signed-off-by: wangzijie
---
v2 -> v3:
- fix read_all_xattrs logic to check and set xattr header
- change parameter name for read_all_xattrs
- change subject
v
-f2fs-devel/502ae396-ae82-44d6-b08d-617e9e9c4...@oppo.com/
Signed-off-by: wangzijie
---
v1:
https://lore.kernel.org/linux-f2fs-devel/20241204122317.3042137-1-wangzij...@honor.com/
change since v1:
- Suggestions from ShengYong to change {read|write}_all_xattrs and add
free_xattrs
- If we may ne
>On 2024/12/4 20:23, wangzijie wrote:
>> When we check inode which just has inline xattr data, we copy
>> inline xattr data from inode, check it(maybe fix it) and copy
>> it again to inode. We can check and fix xattr inplace for this
>> kind of inode to reduce memcpy
When we check inode which just has inline xattr data, we copy
inline xattr data from inode, check it(maybe fix it) and copy
it again to inode. We can check and fix xattr inplace for this
kind of inode to reduce memcpy times.
Signed-off-by: wangzijie
---
fsck/fsck.c | 18 ++
1
>On 2024/9/8 12:12, wangzijie wrote:
>>>> From: Chao Yu via Linux-f2fs-devel
>>>>
>>>>> On 2024/8/27 14:22, wangzijie wrote:
>>>>>> Thread A
>>>>>> -dquot_initialize
>>>>>>
>> From: Chao Yu via Linux-f2fs-devel
>>
>>> On 2024/8/27 14:22, wangzijie wrote:
>>>> Thread A
>>>> -dquot_initialize
>>>> -dqget
>>>> -f2fs_dquot_acquire
>>>> -v2_read_dquot
>&
: return -EINTR
-set SBI_QUOTA_NEED_REPAIR
-set SBI_QUOTA_NEED_REPAIR
When calling read_cache_page_gfp in quota read, thread may receive SIGKILL and
set SBI_QUOTA_NEED_REPAIR, should we set SBI_QUOTA_NEED_REPAIR in this error
path?
Signed-off-by: wangzijie
---
fs/f2fs/inode.c | 3 ++-
fs
Hi Chao,
I think that we should call f2fs_remove_ino_entry in f2fs_evict_inode to delete
ino_entry in CP_XATTR_DIR list.
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-dev
>On 2024/6/25 10:14, wangzijie wrote:
>>> We may trigger high frequent checkpoint for below case:
>>> 1. mkdir /mnt/dir1; set dir1 encrypted
>>> 2. touch /mnt/file1; fsync /mnt/file1
>>> 3. mkdir /mnt/dir2; set dir2 encrypted
>>> 4. touch /mnt/
> We may trigger high frequent checkpoint for below case:
> 1. mkdir /mnt/dir1; set dir1 encrypted
> 2. touch /mnt/file1; fsync /mnt/file1
> 3. mkdir /mnt/dir2; set dir2 encrypted
> 4. touch /mnt/file2; fsync /mnt/file2
> ...
>
> Although, newly created dir and file are not related, due to
> commi
From: Zijie Wang
Date: Mon, 1 Apr 2024 21:24:08 +0800
Subject: [PATCH] [f2fs-dev] f2fs: use f2fs_get_node_page when write inline data
We just need inode page when write inline data, use
f2fs_get_node_page() to get it instead of using dnode_of_data,
which can eliminate unnecessary struct use.
Sig
42 matches
Mail list logo