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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240701141320.GI504479@perftesting>
Date: Mon, 1 Jul 2024 10:13:20 -0400
From: Josef Bacik <josef@...icpanda.com>
To: Johannes Thumshirn <jth@...nel.org>
Cc: Chris Mason <clm@...com>, David Sterba <dsterba@...e.com>,
	linux-btrfs@...r.kernel.org, linux-kernel@...r.kernel.org,
	Johannes Thumshirn <johannes.thumshirn@....com>
Subject: Re: [PATCH v3 4/5] btrfs: don't hold dev_replace rwsem over whole of
 btrfs_map_block

On Mon, Jul 01, 2024 at 12:25:18PM +0200, Johannes Thumshirn wrote:
> From: Johannes Thumshirn <johannes.thumshirn@....com>
> 
> Don't hold the dev_replace rwsem for the entirety of btrfs_map_block().
> 
> It is only needed to protect
> a) calls to find_live_mirror() and
> b) calling into handle_ops_on_dev_replace().
> 
> But there is no need to hold the rwsem for any kind of set_io_stripe()
> calls.
> 
> So relax taking the dev_replace rwsem to only protect both cases and check
> if the device replace status has changed in the meantime, for which we have
> to re-do the find_live_mirror() calls.
> 
> This fixes a deadlock on raid-stripe-tree where device replace performs a
> scrub operation, which in turn calls into btrfs_map_block() to find the
> physical location of the block.
> 
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@....com>

Reviewed-by: Josef Bacik <josef@...icpanda.com>

Thanks,

Josef

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ