lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d1d43936-1de7-4550-8bf2-f4c604b367d1@kernel.org>
Date: Mon, 17 Mar 2025 11:20:25 +0800
From: Chao Yu <chao@...nel.org>
To: Yohan Joung <jyh429@...il.com>, jaegeuk@...nel.org, daeho43@...il.com
Cc: chao@...nel.org, linux-f2fs-devel@...ts.sourceforge.net,
 linux-kernel@...r.kernel.org, Yohan Joung <yohan.joung@...com>
Subject: Re: [PATCH v1] f2fs: optimize f2fs DIO overwrites

On 3/12/25 21:48, Yohan Joung wrote:
> this is unnecessary when we know we are overwriting already allocated
> blocks and the overhead of starting a transaction can be significant
> especially for multithreaded workloads doing small writes.
> 
> Signed-off-by: Yohan Joung <yohan.joung@...com>
> ---
>  fs/f2fs/data.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> index d872f785a996..b55d253f7be9 100644
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -4181,7 +4181,8 @@ static int f2fs_iomap_begin(struct inode *inode, loff_t offset, loff_t length,
>  	map.m_next_pgofs = &next_pgofs;
>  	map.m_seg_type = f2fs_rw_hint_to_seg_type(F2FS_I_SB(inode),
>  						inode->i_write_hint);
> -	if (flags & IOMAP_WRITE)
> +	if ((flags & IOMAP_WRITE) &&
> +		!f2fs_overwrite_io(inode, offset, length))

Can you please add a comment for this change? Otherwise it looks
fine to me.

Thanks,

>  		map.m_may_create = true;
>  
>  	err = f2fs_map_blocks(inode, &map, F2FS_GET_BLOCK_DIO);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ