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: <d3s3h73uzuspthfkenm47ib5peaynakel3f3betafi7szguouj@v6e5cjssj3tn>
Date: Wed, 5 Nov 2025 11:20:24 +0100
From: Jan Kara <jack@...e.cz>
To: yangerkun <yangerkun@...wei.com>
Cc: Jan Kara <jack@...e.cz>, linux-ext4@...r.kernel.org, tytso@....edu, 
	adilger.kernel@...ger.ca, yi.zhang@...wei.com, libaokun1@...wei.com, 
	yangerkun@...weicloud.com
Subject: Re: [PATCH v2 1/4] ext4: remove useless code in
 ext4_map_create_blocks

On Wed 05-11-25 09:39:01, yangerkun wrote:
> 
> 
> 在 2025/11/4 22:28, Jan Kara 写道:
> > On Tue 04-11-25 21:17:47, Yang Erkun wrote:
> > > IO path with EXT4_GET_BLOCKS_PRE_IO means dio within i_size or
> > > dioread_nolock buffer writeback, they all means we need a unwritten
> > > extent(or this extent has already been initialized), and the split won't
> > > zero the range we really write. So this check seems useless. Besides,
> > > even if we repeatedly execute ext4_es_insert_extent, there won't
> > > actually be any issues.
> > > 
> > > Reviewed-by: Zhang Yi <yi.zhang@...wei.com>
> > > Signed-off-by: Yang Erkun <yangerkun@...wei.com>
> > 
> > I agree the check isn't needed for correctness but it seems to be
> > reasonable performance optimization for a common case of writing back
> > already written data in dioread_nolock mode?
> 
> Hi!
> 
> Thank you for your detailed review! I believe you are referring to
> writing back a block within the written extent in dioread_nolock mode.
> If that's the case, we might never enter ext4_map_create_blocks because
> ext4_map_query_blocks will return the block as MAPPED. Please correct me
> if I misunderstood!

No, you're correct and I was confused. Feel free to add:

Reviewed-by: Jan Kara <jack@...e.cz>

								Honza
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ