From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Paolo Bonzini <pbonzini@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: KVM <kvm@vger.kernel.org>, Ackerley Tng <ackerleytng@google.com>,
Chao Peng <chao.p.peng@linux.intel.com>,
Isaku Yamahata <isaku.yamahata@intel.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Michael Roth <michael.roth@amd.com>,
Sean Christopherson <seanjc@google.com>,
Yu Zhang <yu.c.zhang@linux.intel.com>,
"Matthew Wilcox (Oracle)" <willy@infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: build failure after merge of the kvm tree
Date: Mon, 11 Dec 2023 13:50:52 +1100 [thread overview]
Message-ID: <20231211135052.4fb016a6@canb.auug.org.au> (raw)
In-Reply-To: <20231120152227.3bfe2450@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 4814 bytes --]
Hi all,
On Mon, 20 Nov 2023 15:22:27 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the kvm tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
>
> arch/x86/kvm/../../../virt/kvm/guest_memfd.c:306:10: error: 'const struct address_space_operations' has no member named 'error_remove_page'; did you mean 'error_remove_folio'?
> 306 | .error_remove_page = kvm_gmem_error_page,
> | ^~~~~~~~~~~~~~~~~
> | error_remove_folio
> arch/x86/kvm/../../../virt/kvm/guest_memfd.c:306:30: error: initialization of 'int (*)(struct folio *)' from incompatible pointer type 'int (*)(struct address_space *, struct page *)' [-Werror=incompatible-pointer-types]
> 306 | .error_remove_page = kvm_gmem_error_page,
> | ^~~~~~~~~~~~~~~~~~~
> arch/x86/kvm/../../../virt/kvm/guest_memfd.c:306:30: note: (near initialization for 'kvm_gmem_aops.launder_folio')
>
> Caused by commit
>
> 640be5bc564f ("fs: convert error_remove_page to error_remove_folio")
>
> from the mm tree intercting with commit
>
> a7800aa80ea4 ("KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory")
>
> I have applied the following supplied merge fix patch (thanks Andrew).
>
> From: Andrew Morton <akpm@linux-foundation.org>
> Date: Fri, 17 Nov 2023 09:28:33 -0800
> Subject: [PATCH] fs: Convert error_remove_page to error_remove_folio
>
> On Fri, 17 Nov 2023 16:14:47 +0000 "Matthew Wilcox (Oracle)" <willy@infradead.org> wrote:
>
> > There were already assertions that we were not passing a tail page
> > to error_remove_page(), so make the compiler enforce that by converting
> > everything to pass and use a folio.
> >
> > Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> > ---
> > Documentation/filesystems/locking.rst | 4 ++--
> > Documentation/filesystems/vfs.rst | 6 +++---
> > block/fops.c | 2 +-
> > fs/afs/write.c | 2 +-
> > fs/bcachefs/fs.c | 2 +-
> > fs/btrfs/inode.c | 2 +-
> > fs/ceph/addr.c | 4 ++--
> > fs/ext2/inode.c | 2 +-
> > fs/ext4/inode.c | 6 +++---
> > fs/f2fs/compress.c | 2 +-
> > fs/f2fs/inode.c | 2 +-
> > fs/gfs2/aops.c | 4 ++--
> > fs/hugetlbfs/inode.c | 6 +++---
> > fs/nfs/file.c | 2 +-
> > fs/ntfs/aops.c | 6 +++---
> > fs/ocfs2/aops.c | 2 +-
> > fs/xfs/xfs_aops.c | 2 +-
> > fs/zonefs/file.c | 2 +-
> > include/linux/fs.h | 2 +-
> > include/linux/mm.h | 3 ++-
> > mm/memory-failure.c | 10 +++++-----
> > mm/shmem.c | 6 +++---
> > mm/truncate.c | 9 ++++-----
> > virt/kvm/guest_memfd.c | 9 +++++----
>
> virt/kvm/guest_memfd.c exists only in the KVM tree (and hence
> linux-next). So I assume Stephen will use the change from this patch
> when doing his resolution.
>
> This:
> ---
Now this:
virt/kvm/guest_memfd.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/virt/kvm/guest_memfd.c b/virt/kvm/guest_memfd.c
index c2e2371720a9..c23ce219e21c 100644
--- a/virt/kvm/guest_memfd.c
+++ b/virt/kvm/guest_memfd.c
@@ -267,7 +267,8 @@ static int kvm_gmem_migrate_folio(struct address_space *mapping,
return -EINVAL;
}
-static int kvm_gmem_error_page(struct address_space *mapping, struct page *page)
+static int kvm_gmem_error_folio(struct address_space *mapping,
+ struct folio *folio)
{
struct list_head *gmem_list = &mapping->private_list;
struct kvm_gmem *gmem;
@@ -275,8 +276,8 @@ static int kvm_gmem_error_page(struct address_space *mapping, struct page *page)
filemap_invalidate_lock_shared(mapping);
- start = page->index;
- end = start + thp_nr_pages(page);
+ start = folio->index;
+ end = start + folio_nr_pages(folio);
list_for_each_entry(gmem, gmem_list, entry)
kvm_gmem_invalidate_begin(gmem, start, end);
@@ -301,7 +302,7 @@ static int kvm_gmem_error_page(struct address_space *mapping, struct page *page)
static const struct address_space_operations kvm_gmem_aops = {
.dirty_folio = noop_dirty_folio,
.migrate_folio = kvm_gmem_migrate_folio,
- .error_remove_page = kvm_gmem_error_page,
+ .error_remove_folio = kvm_gmem_error_folio,
};
static int kvm_gmem_getattr(struct mnt_idmap *idmap, const struct path *path,
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2023-12-11 2:51 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-20 4:22 linux-next: build failure after merge of the kvm tree Stephen Rothwell
2023-12-11 2:50 ` Stephen Rothwell [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-04-12 3:34 Stephen Rothwell
2024-04-12 3:35 ` Stephen Rothwell
2024-04-12 12:14 ` Paolo Bonzini
2023-11-22 2:14 Stephen Rothwell
2022-04-19 5:34 Stephen Rothwell
2022-04-19 16:01 ` Sean Christopherson
2022-04-19 16:09 ` Paolo Bonzini
2022-04-21 18:06 ` Paolo Bonzini
2022-04-27 3:23 ` Stephen Rothwell
2022-04-27 6:06 ` Paolo Bonzini
2021-02-08 5:33 Stephen Rothwell
2021-02-08 11:18 ` Yu Zhang
2021-02-05 5:02 Stephen Rothwell
2021-02-05 10:08 ` Paolo Bonzini
2021-02-07 19:48 ` Stephen Rothwell
2021-02-09 4:56 ` Stephen Rothwell
2020-07-17 5:57 Stephen Rothwell
2020-07-29 7:06 ` Stephen Rothwell
2020-05-21 6:28 Stephen Rothwell
2020-06-04 2:54 ` Stephen Rothwell
2019-02-18 3:42 Stephen Rothwell
2019-02-19 15:36 ` Sean Christopherson
2019-02-19 18:17 ` Paolo Bonzini
2018-12-19 4:33 Stephen Rothwell
2017-02-08 3:23 Stephen Rothwell
2016-12-19 1:11 Stephen Rothwell
2015-09-08 1:35 Stephen Rothwell
2015-09-08 2:10 ` Wanpeng Li
2015-09-08 9:24 ` Paolo Bonzini
2015-05-29 7:36 Stephen Rothwell
2015-05-29 7:54 ` Ingo Molnar
2015-05-29 12:08 ` Paolo Bonzini
2014-11-24 6:19 Stephen Rothwell
2014-11-24 9:38 ` Paolo Bonzini
2014-08-06 4:39 Stephen Rothwell
2014-03-11 23:55 Mark Brown
2014-01-10 3:00 Stephen Rothwell
2014-01-17 4:03 ` Stephen Rothwell
2012-08-23 3:21 Stephen Rothwell
2012-03-06 4:53 Stephen Rothwell
2012-03-06 10:34 ` Avi Kivity
2010-08-30 1:35 Stephen Rothwell
2010-08-30 10:03 ` Alexander Graf
2010-08-30 10:56 ` Avi Kivity
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=20231211135052.4fb016a6@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=ackerleytng@google.com \
--cc=akpm@linux-foundation.org \
--cc=chao.p.peng@linux.intel.com \
--cc=isaku.yamahata@intel.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=michael.roth@amd.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=willy@infradead.org \
--cc=yu.c.zhang@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).