inode_lock_shared() -> down_read(&inode->i_rwsem)
inode_lock() -> down_write(&inode->i_rwsem)
Inode is not updated in f2fs_seek_block(), so there is no need
to hold write lock, use read lock for more efficiency.
Signed-off-by: zhangxirui
---
fs/f2fs/file.c | 6 +++---
1 file changed, 3 i
In sparse mode we just read or write to a sparse file not a block device
so no need to check device mount state in sparse mode.
Signed-off-by: zhangxirui
---
lib/libf2fs.c | 4
1 file changed, 4 insertions(+)
diff --git a/lib/libf2fs.c b/lib/libf2fs.c
index 2451201..5315de2 100644
--- a/li
On 2024/1/26 14:37, zhangxirui wrote:
>> In sparse mode we just read or write to a sparse file not a block device
>> so no need to check device mount state in sparse mode.
>
>I guess it needs to check whether regular file was a backfile of mounted
>loop device, so we can only skip block device rela
>On 2024/2/1 14:40, zhangxirui wrote:
>> On 2024/1/26 14:37, zhangxirui wrote:
In sparse mode we just read or write to a sparse file not a block device
so no need to check device mount state in sparse mode.
>>>
>>> I guess it needs to check whether regular file was a backfile of mounted
>
If overprov_segment_count < rsvd_segment_count will
set_cp(overprov_segment_count) twice, reduce it.
Signed-off-by: zhangxirui
---
mkfs/f2fs_format.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c
index e26a513..794ced5 100