public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Christian Brauner <brauner@kernel•org>, David Sterba <dsterba@suse•cz>
Cc: David Sterba <dsterba@suse•com>,
	Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
	Linux Next Mailing List <linux-next@vger•kernel.org>,
	"Matthew Wilcox (Oracle)" <willy@infradead•org>,
	Qu Wenruo <wqu@suse•com>
Subject: linux-next: manual merge of the vfs-brauner tree with the btrfs tree
Date: Mon, 27 Nov 2023 09:14:37 +1100	[thread overview]
Message-ID: <20231127091437.4062f96c@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 7344 bytes --]

Hi all,

Today's linux-next merge of the vfs-brauner tree got conflicts in:

  fs/btrfs/extent_io.c
  fs/btrfs/subpage.c

between commit:

  16aee93de711 ("btrfs: migrate to use folio private instead of page private")

from the btrfs tree and commit:

  600f111ef51d ("fs: Rename mapping private members")

from the vfs-brauner tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/btrfs/extent_io.c
index 40cf80af88b1,3431a53bf3fd..000000000000
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@@ -878,13 -870,13 +878,13 @@@ static int attach_extent_buffer_page(st
  	 * will not race with any other ebs.
  	 */
  	if (page->mapping)
- 		lockdep_assert_held(&page->mapping->private_lock);
+ 		lockdep_assert_held(&page->mapping->i_private_lock);
  
  	if (fs_info->nodesize >= PAGE_SIZE) {
 -		if (!PagePrivate(page))
 -			attach_page_private(page, eb);
 +		if (!folio_test_private(folio))
 +			folio_attach_private(folio, eb);
  		else
 -			WARN_ON(page->private != (unsigned long)eb);
 +			WARN_ON(folio_get_private(folio) != eb);
  		return 0;
  	}
  
@@@ -1748,9 -1736,9 +1748,9 @@@ static int submit_eb_subpage(struct pag
  		 * Take private lock to ensure the subpage won't be detached
  		 * in the meantime.
  		 */
- 		spin_lock(&page->mapping->private_lock);
+ 		spin_lock(&page->mapping->i_private_lock);
 -		if (!PagePrivate(page)) {
 +		if (!folio_test_private(folio)) {
- 			spin_unlock(&page->mapping->private_lock);
+ 			spin_unlock(&page->mapping->i_private_lock);
  			break;
  		}
  		spin_lock_irqsave(&subpage->lock, flags);
@@@ -1824,9 -1811,9 +1824,9 @@@ static int submit_eb_page(struct page *
  	if (btrfs_sb(page->mapping->host->i_sb)->nodesize < PAGE_SIZE)
  		return submit_eb_subpage(page, wbc);
  
- 	spin_lock(&mapping->private_lock);
+ 	spin_lock(&mapping->i_private_lock);
 -	if (!PagePrivate(page)) {
 +	if (!folio_test_private(folio)) {
- 		spin_unlock(&mapping->private_lock);
+ 		spin_unlock(&mapping->i_private_lock);
  		return 0;
  	}
  
@@@ -3067,13 -3054,12 +3067,13 @@@ static int extent_buffer_under_io(cons
  
  static bool page_range_has_eb(struct btrfs_fs_info *fs_info, struct page *page)
  {
 +	struct folio *folio = page_folio(page);
  	struct btrfs_subpage *subpage;
  
- 	lockdep_assert_held(&page->mapping->private_lock);
+ 	lockdep_assert_held(&page->mapping->i_private_lock);
  
 -	if (PagePrivate(page)) {
 -		subpage = (struct btrfs_subpage *)page->private;
 +	if (folio_test_private(folio)) {
 +		subpage = folio_get_private(folio);
  		if (atomic_read(&subpage->eb_refs))
  			return true;
  		/*
@@@ -3090,18 -3076,17 +3090,18 @@@ static void detach_extent_buffer_page(s
  {
  	struct btrfs_fs_info *fs_info = eb->fs_info;
  	const bool mapped = !test_bit(EXTENT_BUFFER_UNMAPPED, &eb->bflags);
 +	struct folio *folio = page_folio(page);
  
  	/*
 -	 * For mapped eb, we're going to change the page private, which should
 +	 * For mapped eb, we're going to change the folio private, which should
- 	 * be done under the private_lock.
+ 	 * be done under the i_private_lock.
  	 */
  	if (mapped)
- 		spin_lock(&page->mapping->private_lock);
+ 		spin_lock(&page->mapping->i_private_lock);
  
 -	if (!PagePrivate(page)) {
 +	if (!folio_test_private(folio)) {
  		if (mapped)
- 			spin_unlock(&page->mapping->private_lock);
+ 			spin_unlock(&page->mapping->i_private_lock);
  		return;
  	}
  
@@@ -3117,11 -3103,14 +3117,11 @@@
  			BUG_ON(test_bit(EXTENT_BUFFER_DIRTY, &eb->bflags));
  			BUG_ON(PageDirty(page));
  			BUG_ON(PageWriteback(page));
 -			/*
 -			 * We need to make sure we haven't be attached
 -			 * to a new eb.
 -			 */
 -			detach_page_private(page);
 +			/* We need to make sure we haven't be attached to a new eb. */
 +			folio_detach_private(folio);
  		}
  		if (mapped)
- 			spin_unlock(&page->mapping->private_lock);
+ 			spin_unlock(&page->mapping->i_private_lock);
  		return;
  	}
  
@@@ -3526,8 -3513,8 +3526,8 @@@ struct extent_buffer *alloc_extent_buff
  	num_pages = num_extent_pages(eb);
  
  	/*
 -	 * Preallocate page->private for subpage case, so that we won't
 +	 * Preallocate folio private for subpage case, so that we won't
- 	 * allocate memory with private_lock nor page lock hold.
+ 	 * allocate memory with i_private_lock nor page lock hold.
  	 *
  	 * The memory will be freed by attach_extent_buffer_page() or freed
  	 * manually if we exit earlier.
@@@ -4638,11 -4560,11 +4638,11 @@@ static int try_release_subpage_extent_b
  		release_extent_buffer(eb);
  	}
  	/*
 -	 * Finally to check if we have cleared page private, as if we have
 -	 * released all ebs in the page, the page private should be cleared now.
 +	 * Finally to check if we have cleared folio private, as if we have
 +	 * released all ebs in the page, the folio private should be cleared now.
  	 */
- 	spin_lock(&page->mapping->private_lock);
+ 	spin_lock(&page->mapping->i_private_lock);
 -	if (!PagePrivate(page))
 +	if (!folio_test_private(page_folio(page)))
  		ret = 1;
  	else
  		ret = 0;
@@@ -4660,12 -4581,12 +4660,12 @@@ int try_release_extent_buffer(struct pa
  		return try_release_subpage_extent_buffer(page);
  
  	/*
 -	 * We need to make sure nobody is changing page->private, as we rely on
 -	 * page->private as the pointer to extent buffer.
 +	 * We need to make sure nobody is changing folio private, as we rely on
 +	 * folio private as the pointer to extent buffer.
  	 */
- 	spin_lock(&page->mapping->private_lock);
+ 	spin_lock(&page->mapping->i_private_lock);
 -	if (!PagePrivate(page)) {
 +	if (!folio_test_private(folio)) {
- 		spin_unlock(&page->mapping->private_lock);
+ 		spin_unlock(&page->mapping->i_private_lock);
  		return 1;
  	}
  
diff --cc fs/btrfs/subpage.c
index caf0013f2545,2347cf15278b..000000000000
--- a/fs/btrfs/subpage.c
+++ b/fs/btrfs/subpage.c
@@@ -202,10 -199,10 +202,10 @@@ void btrfs_page_inc_eb_refs(const struc
  	if (!btrfs_is_subpage(fs_info, page))
  		return;
  
 -	ASSERT(PagePrivate(page) && page->mapping);
 +	ASSERT(folio_test_private(folio) && page->mapping);
- 	lockdep_assert_held(&page->mapping->private_lock);
+ 	lockdep_assert_held(&page->mapping->i_private_lock);
  
 -	subpage = (struct btrfs_subpage *)page->private;
 +	subpage = folio_get_private(folio);
  	atomic_inc(&subpage->eb_refs);
  }
  
@@@ -218,10 -214,10 +218,10 @@@ void btrfs_page_dec_eb_refs(const struc
  	if (!btrfs_is_subpage(fs_info, page))
  		return;
  
 -	ASSERT(PagePrivate(page) && page->mapping);
 +	ASSERT(folio_test_private(folio) && page->mapping);
- 	lockdep_assert_held(&page->mapping->private_lock);
+ 	lockdep_assert_held(&page->mapping->i_private_lock);
  
 -	subpage = (struct btrfs_subpage *)page->private;
 +	subpage = folio_get_private(folio);
  	ASSERT(atomic_read(&subpage->eb_refs));
  	atomic_dec(&subpage->eb_refs);
  }

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2023-11-26 22:14 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-26 22:14 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-11-02 21:58 linux-next: manual merge of the vfs-brauner tree with the btrfs tree Stephen Rothwell
2025-12-02  0:58 ` Stephen Rothwell
2024-10-31 22:22 Stephen Rothwell
2024-10-15 21:51 Stephen Rothwell
2024-11-18 22:16 ` Stephen Rothwell
2024-06-18 11:41 Mark Brown
2024-07-16  0:58 ` Stephen Rothwell
2024-05-03  1:00 Stephen Rothwell
2024-05-14  1:38 ` Stephen Rothwell
2024-04-30 23:42 Stephen Rothwell
2023-12-06 23:32 Stephen Rothwell
2024-01-08 20:56 ` Stephen Rothwell
2023-11-26 22:20 Stephen Rothwell
2023-11-28 21:33 ` Nathan Chancellor
2023-11-29 11:09   ` Jan Kara
2023-11-29 20:50     ` Stephen Rothwell
2024-01-08 20:53       ` Stephen Rothwell
2023-10-08 23:48 Stephen Rothwell
2023-10-09 16:15 ` Christian Brauner
2023-10-10 21:37   ` Stephen Rothwell
2023-10-11  0:24     ` Stephen Rothwell
2023-10-11  9:20     ` David Sterba
2023-10-12 15:42       ` David Sterba
2023-10-23 17:55         ` David Sterba
2023-10-23 21:25           ` Stephen Rothwell
2023-10-24 15:32             ` David Sterba
2023-10-25  0:09               ` Stephen Rothwell
2023-08-15  1:20 Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231127091437.4062f96c@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=brauner@kernel$(echo .)org \
    --cc=dsterba@suse$(echo .)com \
    --cc=dsterba@suse$(echo .)cz \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=willy@infradead$(echo .)org \
    --cc=wqu@suse$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox