linux-next: build failure after merge of the mm tree
Subsystems (2)
Hi all,
After merging the mm tree, today's linux-next build (x86_64 allmodconfig) failed like this:
fs/xfs/xfs_notify_failure.c: In function 'xfs_dax_notify_ddev_failure':fs/xfs/xfs_notify_failure.c:126:44: error: passing argument 1 of 'xfs_alloc_read_agf' from incompatible pointer type [-Werror=incompatible-pointer-types]
126 | error = xfs_alloc_read_agf(mp, tp, agno, 0, &agf_bp);
| ^~
| |
| struct xfs_mount *
In file included from fs/xfs/xfs_notify_failure.c:12:
fs/xfs/libxfs/xfs_alloc.h:173:42: note: expected 'struct xfs_perag *' but argument is of type 'struct xfs_mount *'
173 | int xfs_alloc_read_agf(struct xfs_perag *pag, struct xfs_trans *tp, int flags,
| ~~~~~~~~~~~~~~~~~~^~~
fs/xfs/xfs_notify_failure.c:126:25: error: too many arguments to function 'xfs_alloc_read_agf'
126 | error = xfs_alloc_read_agf(mp, tp, agno, 0, &agf_bp);
| ^~~~~~~~~~~~~~~~~~
In file included from fs/xfs/xfs_notify_failure.c:12:
fs/xfs/libxfs/xfs_alloc.h:173:5: note: declared here
173 | int xfs_alloc_read_agf(struct xfs_perag *pag, struct xfs_trans *tp, int flags,
| ^~~~~~~~~~~~~~~~~~cc1: all warnings being treated as errors
Caused by commit
469a9c74c119 ("xfs: implement ->notify_failure() for XFS")
interacting with commit
c4829aba9c8d ("xfs: pass perag to xfs_alloc_read_agf()")
from the xfs tree.
I have applied the following merge fix patch.
From: Stephen Rothwell <[email protected]>
Date: Fri, 8 Jul 2022 19:11:56 +1000
Subject: [PATCH] fix up for "xfs: pass perag to xfs_alloc_read_agf()"
interacting with "xfs: implement ->notify_failure() for XFS"
--- fs/xfs/xfs_notify_failure.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
fs/xfs/xfs_notify_failure.c +4 -1
@@ -18,6 +18,7 @@#include "xfs_rmap_btree.h" #include "xfs_rtalloc.h" #include "xfs_trans.h" +#include "xfs_ag.h" #include <linux/mm.h> #include <linux/dax.h>
@@ -122,8 +123,10 @@ xfs_dax_notify_ddev_failure(struct failure_info notify;struct xfs_agf *agf;xfs_agblock_t agend; +struct xfs_perag *pag; - error =xfs_alloc_read_agf (mp, tp, agno,0 , &agf_bp); + pag =xfs_perag_get (mp, agno); + error =xfs_alloc_read_agf (pag, tp,0 , &agf_bp);if (error)break ;
Signature · 5 lines
2.35.1 -- Cheers, Stephen Rothwell
Quoted 60 lines · Stephen Rothwell
Hi all,
After merging the mm tree, today's linux-next build (
x86_64allmodconfig) failed like this:
fs/xfs/xfs_notify_failure.c: In function 'xfs_dax_notify_ddev_failure':fs/xfs/xfs_notify_failure.c:126:44: error: passing argument 1 of 'xfs_alloc_read_agf' from incompatible pointer type [-Werror=incompatible-pointer-types]126 | error = xfs_alloc_read_agf(mp, tp, agno, 0, &agf_bp); | ^~ | | | struct xfs_mount * In file included from fs/xfs/xfs_notify_failure.c:12: fs/xfs/libxfs/xfs_alloc.h:173:42: note: expected 'struct xfs_perag *' but argument is of type 'struct xfs_mount *' 173 | int xfs_alloc_read_agf(struct xfs_perag *pag, struct xfs_trans *tp, int flags, | ~~~~~~~~~~~~~~~~~~^~~ fs/xfs/xfs_notify_failure.c:126:25: error: too many arguments to function 'xfs_alloc_read_agf' 126 | error = xfs_alloc_read_agf(mp, tp, agno, 0, &agf_bp); | ^~~~~~~~~~~~~~~~~~ In file included from fs/xfs/xfs_notify_failure.c:12: fs/xfs/libxfs/xfs_alloc.h:173:5: note: declared here 173 | int xfs_alloc_read_agf(struct xfs_perag *pag, struct xfs_trans *tp, int flags, | ^~~~~~~~~~~~~~~~~~cc1: all warnings being treated as errors
Caused by commit
469a9c74c119("xfs: implement ->notify_failure() for XFS")interacting with commit
c4829aba9c8d("xfs: pass perag toxfs_alloc_read_agf()")from the xfs tree.
I have applied the following merge fix patch.
From: Stephen Rothwell <[email protected]>
Date: Fri, 8 Jul 2022 19:11:56 +1000
Subject: [PATCH] fix up for "xfs: pass perag toxfs_alloc_read_agf()"interacting with "xfs: implement ->notify_failure() for XFS"
Signed-off-by Stephen Rothwell <[email protected]>--- fs/xfs/xfs_notify_failure.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)fs/xfs/xfs_notify_failure.c +1
-0@@ -18,6 +18,7 @@#include "xfs_rmap_btree.h" #include "xfs_rtalloc.h" #include "xfs_trans.h" +#include "xfs_ag.h" #include <linux/mm.h> #include <linux/dax.h>
fs/xfs/xfs_notify_failure.c xfs_dax_notify_ddev_failure( · line 131
Quoted 10 lines
fs/xfs/xfs_notify_failure.c +3
-1@@ -122,8 +123,10 @@ xfs_dax_notify_ddev_failure(struct failure_info notify;struct xfs_agf *agf;xfs_agblock_t agend; +struct xfs_perag *pag; - error =xfs_alloc_read_agf (mp, tp, agno,0 , &agf_bp); + pag =xfs_perag_get (mp, agno); + error =xfs_alloc_read_agf (pag, tp,0 , &agf_bp);if (error)break ;
This isn't quite correct -- references to xfs_perag objects must be released once they are acquired. The following patch against today's tree fixes this problem:
fs/xfs/xfs_notify_failure.c +5 -2
@@ -127,10 +127,12 @@ xfs_dax_notify_ddev_failure( pag =xfs_perag_get (mp, agno); error =xfs_alloc_read_agf (pag, tp,0 , &agf_bp); -if (error) +if (error) { +xfs_perag_put (pag);break ; + } - cur =xfs_rmapbt_init_cursor (mp, tp, agf_bp, agf_bp->b_pag); + cur =xfs_rmapbt_init_cursor (mp, tp, agf_bp, pag);/* * Set the rmap range from ri_low to ri_high, which represents
@@ -151,6 +153,7 @@ xfs_dax_notify_ddev_failure( xfs_dax_failure_fn, ¬ify);xfs_btree_del_cursor (cur, error);xfs_trans_brelse (tp, agf_bp); +xfs_perag_put (pag);if (error)break ;
--D
Quoted 7 lines
Signature · 6 lines
-- 2.35.1 -- Cheers, Stephen Rothwell
Hi Darrick,
Quoted 25 lines · On Fri, 8 Jul 2022 08:17:51 -0700 "Darrick J. Wong" <[email protected]> wrote:
This isn't quite correct -- references to
xfs_peragobjects must be released once they are acquired. The following patch against today's tree fixes this problem:fs/xfs/xfs_notify_failure.c +4
-2@@ -127,10 +127,12 @@ xfs_dax_notify_ddev_failure( pag =xfs_perag_get (mp, agno); error =xfs_alloc_read_agf (pag, tp,0 , &agf_bp); -if (error) +if (error) { +xfs_perag_put (pag);break ; + } - cur =xfs_rmapbt_init_cursor (mp, tp, agf_bp, agf_bp->b_pag); + cur =xfs_rmapbt_init_cursor (mp, tp, agf_bp, pag);/* * Set the rmap range from ri_low to ri_high, which represents
fs/xfs/xfs_notify_failure.c xfs_dax_notify_ddev_failure( · line 159
Quoted 7 lines
fs/xfs/xfs_notify_failure.c +1
-0@@ -151,6 +153,7 @@ xfs_dax_notify_ddev_failure( xfs_dax_failure_fn, ¬ify);xfs_btree_del_cursor (cur, error);xfs_trans_brelse (tp, agf_bp); +xfs_perag_put (pag);if (error)break ;
Thanks, I will add that to the resolution from today.
Signature · 2 lines
Cheers, Stephen Rothwell