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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DFOC3S5F0LN3.158CDRO798GJ8@wdc.com>
Date: Wed, 14 Jan 2026 13:09:27 +0000
From: Naohiro Aota <Naohiro.Aota@....com>
To: Jiasheng Jiang <jiashengjiangcool@...il.com>, "boris@....io"
	<boris@....io>
CC: "clm@...com" <clm@...com>, "dsterba@...e.com" <dsterba@...e.com>,
	"linux-btrfs@...r.kernel.org" <linux-btrfs@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] btrfs: zoned: remove redundant space_info lock and
 variable in do_allocation_zoned

On Tue Jan 13, 2026 at 5:22 AM JST, Jiasheng Jiang wrote:
> In do_allocation_zoned(), the code acquires space_info->lock before
> block_group->lock. However, the critical section does not access or
> modify any members of the space_info structure. Thus, the lock is
> redundant as it provides no necessary synchronization here.
>
> This change simplifies the locking logic and aligns the function with
> other zoned paths, such as __btrfs_add_free_space_zoned(), which only
> rely on block_group->lock. Since the 'space_info' local variable is
> no longer used after removing the lock calls, it is also removed.
>
> Removing this unnecessary lock reduces contention on the global
> space_info lock, improving concurrency in the zoned allocation path.
>
> Signed-off-by: Jiasheng Jiang <jiashengjiangcool@...il.com>

Looks good to me.

Reviewed-by: Naohiro Aota <naohiro.aota@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ