Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3722318rdb; Sun, 10 Dec 2023 18:53:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IEaMduDpeiIyKNEQE9zdzHHEgp98Yirhfg+L9kIbu1JM8wMckKUBOhRyvOD6mLAbfAACcvH X-Received: by 2002:a05:6871:28a8:b0:1e9:da6f:a161 with SMTP id bq40-20020a05687128a800b001e9da6fa161mr4852813oac.3.1702263218254; Sun, 10 Dec 2023 18:53:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702263218; cv=none; d=google.com; s=arc-20160816; b=vUqjk5l6Askkj4MQdHKlCrpwGRaLcxKAeHySY7g7aFn4UxcOIIHhwc+TkyJ/UowLfA 1Uhpx7EbB+B0zMeEpbwrWNfAb3GfvIJ7zJbVTnEpm18QmbukKsrlav5Le31hBVZEmKLX pccl1UkzVTFqMVzoeJTPTJJKqxeLRvVDJU2b7gcTBcu0+gVfEAjA/NxFGqdD9j7lby6c IWHPrXD0KlEN6572j6k6UxAvKtWEuUL2CHxA7ujpe1wr9sKmPHRyC66u9f60vkOcLHuC 0NovW/9dEkAQ7t3Yogf78bkXXdZ06u+2CfLoFEKs4L9ku4e7EfHD6rPaEP0kSTPXgFV/ F/uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=Sq8nbVEcRVues8cBbXzwXlj2IWgRQ6rEbTmY8CyoHEQ=; fh=PZke8xm2IXezaW1HYYDHcti0LY63sQ5NCKPgN60jRtg=; b=JzjsyV4TWpA9QgArYkD8Zp5CEm4YQFWDChOsNyGlWTeqnY/1wonxSt0WYBZ4oFLvtV 3QB4LhyJEtsxEGkAl1CvSfzXjzv6PRaIwKBYpJ11Qt1jRAO9SWCR0A0F4QhXTcVu5hs1 L4vkkqaWTqfKyRnf6Z6HWm3EhvymGMu4VafAg3IjtkdeK+WJhY990PGvdm7L5UlGb7WK oqM94EbOiQzSku2JEZSxIr/2u7rfj1iw/GcWc5OvsS8SOHPEAhSzG8BjDCSx2EJ4wUyY MbZ/uokbBuFxeoTg2cC+oIpHRNVnvo5HRgw3ECurk+YZb8oaVfMEtL8RZwHZ44Yp3121 wCFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=FlJaLcfv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canb.auug.org.au Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id 14-20020a63174e000000b005b896ecd1efsi5266362pgx.172.2023.12.10.18.53.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 18:53:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=FlJaLcfv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canb.auug.org.au Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 866E080658EC; Sun, 10 Dec 2023 18:52:23 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233540AbjLKCvu (ORCPT + 99 others); Sun, 10 Dec 2023 21:51:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233148AbjLKCvd (ORCPT ); Sun, 10 Dec 2023 21:51:33 -0500 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 937A21FD2; Sun, 10 Dec 2023 18:51:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canb.auug.org.au; s=201702; t=1702263056; bh=Sq8nbVEcRVues8cBbXzwXlj2IWgRQ6rEbTmY8CyoHEQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=FlJaLcfvWS0edDd1sYTx/8DzmUXQDkHkg7aaaVy2DXBd/DYjO4uRS7amjU047M51z 0leWYyiuNja1b+mhQqTLXKFmZeAExiFUs4Yahv5l6+i/QqscvmIrvMNyTOay2c5qBH ViUrDHolpRMPXcQRpUmsTwkjiuQev7Rcyx1SdwDlbPwnh/mO3381+uTrqfsdEOTguO 4Gsvr1lOrZBGId28c59lxYnjBFFZpHbAngOG6PRuQBGu2Q7ClTVeBrLzcdg69A+85q BBOaMws56i3778t58GsA6YA68vMMA/KRAGmHRR5UEuW+hy8uYJxpN3SZlYbFvwFdOK sJW1eehFHeiiA== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4SpR7y06KGz4xNH; Mon, 11 Dec 2023 13:50:53 +1100 (AEDT) Date: Mon, 11 Dec 2023 13:50:52 +1100 From: Stephen Rothwell To: Paolo Bonzini , Andrew Morton Cc: KVM , Ackerley Tng , Chao Peng , Isaku Yamahata , "Kirill A. Shutemov" , Michael Roth , Sean Christopherson , Yu Zhang , "Matthew Wilcox (Oracle)" , Linux Kernel Mailing List , Linux Next Mailing List Subject: Re: linux-next: build failure after merge of the kvm tree Message-ID: <20231211135052.4fb016a6@canb.auug.org.au> In-Reply-To: <20231120152227.3bfe2450@canb.auug.org.au> References: <20231120152227.3bfe2450@canb.auug.org.au> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/k6L+z4ZF5AITNIBFCyYc60_"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Sun, 10 Dec 2023 18:52:23 -0800 (PST) --Sig_/k6L+z4ZF5AITNIBFCyYc60_ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi all, On Mon, 20 Nov 2023 15:22:27 +1100 Stephen Rothwell = wrote: > > After merging the kvm tree, today's linux-next build (x86_64 allmodconfig) > failed like this: >=20 > 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 =3D kvm_gmem_error_page, > | ^~~~~~~~~~~~~~~~~ > | error_remove_folio > arch/x86/kvm/../../../virt/kvm/guest_memfd.c:306:30: error: initializatio= n of 'int (*)(struct folio *)' from incompatible pointer type 'int (*)(stru= ct address_space *, struct page *)' [-Werror=3Dincompatible-pointer-types] > 306 | .error_remove_page =3D kvm_gmem_error_page, > | ^~~~~~~~~~~~~~~~~~~ > arch/x86/kvm/../../../virt/kvm/guest_memfd.c:306:30: note: (near initiali= zation for 'kvm_gmem_aops.launder_folio') >=20 > Caused by commit >=20 > 640be5bc564f ("fs: convert error_remove_page to error_remove_folio") >=20 > from the mm tree intercting with commit >=20 > a7800aa80ea4 ("KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specif= ic backing memory") >=20 > I have applied the following supplied merge fix patch (thanks Andrew). >=20 > From: Andrew Morton > Date: Fri, 17 Nov 2023 09:28:33 -0800 > Subject: [PATCH] fs: Convert error_remove_page to error_remove_folio >=20 > On Fri, 17 Nov 2023 16:14:47 +0000 "Matthew Wilcox (Oracle)" wrote: >=20 > > 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) > > --- > > 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 +++++---- =20 >=20 > 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. >=20 > 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; } =20 -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 =3D &mapping->private_list; struct kvm_gmem *gmem; @@ -275,8 +276,8 @@ static int kvm_gmem_error_page(struct address_space *ma= pping, struct page *page) =20 filemap_invalidate_lock_shared(mapping); =20 - start =3D page->index; - end =3D start + thp_nr_pages(page); + start =3D folio->index; + end =3D start + folio_nr_pages(folio); =20 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 *ma= pping, struct page *page) static const struct address_space_operations kvm_gmem_aops =3D { .dirty_folio =3D noop_dirty_folio, .migrate_folio =3D kvm_gmem_migrate_folio, - .error_remove_page =3D kvm_gmem_error_page, + .error_remove_folio =3D kvm_gmem_error_folio, }; =20 static int kvm_gmem_getattr(struct mnt_idmap *idmap, const struct path *pa= th, --=20 Cheers, Stephen Rothwell --Sig_/k6L+z4ZF5AITNIBFCyYc60_ Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAmV2eQwACgkQAVBC80lX 0GxNSAf/dDZBSEWcxmOyeozZ/ArXSlpS/X2SmABjDh02ed8wURGrwmrayYtj4HF2 YnxLKEulMDxUjOT3upvFvamu/xaZhDFwEfBboxjvJ4rqbYKUeBOoB0S8UKAEee7P yW0lW0+nvqDqc7nfHCGtBPIq9VsIUdi6P9YD9XHcYuuA73pEL8ZVGi8aWZEOlU8d UZ3q9qsMlWZS5Na1RDgIjFR+hY89xCCI3hWwGx5Cw1Dj/MYDqSgsOVENnBrSvBgx gWbemvzi5rAdiAZTcFrTlHKTlU6+eJAsmyZzofR3ddwbVs1DX1rIqIZKUZDyhLiG ydPrmhDb0eopw1fDRwxu1M0yTAnVIA== =EZzi -----END PGP SIGNATURE----- --Sig_/k6L+z4ZF5AITNIBFCyYc60_--