Re: [PATCH 1/2] xfs: add lock protection when remove perag from radix tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 04, 2023 at 12:39:10PM +0800, Long Li wrote:
> Look at the perag insertion into the radix tree, protected by
> mp->m_perag_lock. When the file system is unmounted, the perag is
> removed from the radix tree, also protected by mp->m_perag_lock.
> Therefore, mp->m_perag_lock is also added when removing a perag
> from the radix tree in error path in xfs_initialize_perag().

There really can't be anything we are racing with at this point.
That beeing said I think clearing locking rules are always a good
thing.  So maybe reword the above as:

"Take mp->m_perag_lock for deletions from the perag radix tree in
 xfs_initialize_perag to be consistent with additions to it even
 if there can't be concurrent modifications to it at this point"

With that:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux