[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <PH0PR04MB741656BC63FF14D8995B46529B019@PH0PR04MB7416.namprd04.prod.outlook.com>
Date: Mon, 28 Feb 2022 15:51:43 +0000
From: Johannes Thumshirn <Johannes.Thumshirn@....com>
To: Niels Dossche <dossche.niels@...il.com>,
"linux-btrfs@...r.kernel.org" <linux-btrfs@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: "clm@...com" <clm@...com>,
"josef@...icpanda.com" <josef@...icpanda.com>,
"dsterba@...e.com" <dsterba@...e.com>,
Niels Dossche <niels.dossche@...nt.be>
Subject: Re: [PATCH] btrfs: extend locking to all space_info members accesses
On 25/02/2022 22:21, Niels Dossche wrote:
> bytes_pinned is always accessed under space_info->lock, except in
> btrfs_preempt_reclaim_metadata_space, however the other members are
> accessed under that lock. The reserved member of the rsv's are also
> partially accessed under a lock and partially not. Move all these
> accesses into the same lock to ensure consistency.
Maybe also add a lockdep_assert_held() call to need_preemptive_reclaim().
As of now, it has only two callsites which both hold the lock before
accessing bytes_pinned et al, but better safe then sorry.
Anyways,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@....com>
Powered by blists - more mailing lists