Message ID | cover.1728452897.git.wqu@suse.com (mailing list archive) |
---|---|
Headers | show |
Series | btrfs: unify the read and writer locks for btrfs_subpage | expand |
On Wed, Oct 09, 2024 at 04:21:05PM +1030, Qu Wenruo wrote: > [CHANGELOG] > v2: > - Rename btrfs_subpage::locked to btrfs_subpage::nr_locked > > When the handling of sector size < page size is introduced, there are > two types of locking, reader and writer lock. > > The main reason for the reader lock is to handle metadata to make sure > the page::private is not released when there is still a metadata being > read. > > However since commit d7172f52e993 ("btrfs: use per-buffer locking for > extent_buffer reading"), metadata read no longer relies on > btrfs_subpage::readers. > > Making the writer lock as the only utilized subpage locking. > > This patchset converts all the existing reader lock usage and rename the > writer lock into a generic lock. > > This patchset relies on this patch "btrfs: fix the delalloc range > locking if sector size < page size", as it removes the last user of > btrfs_folio_start_writer_lock(). > > Qu Wenruo (2): > btrfs: unify to use writer locks for subpage locking > btrfs: rename btrfs_folio_(set|start|end)_writer_lock() Reviewed-by: David Sterba <dsterba@suse.com>