2012-05-10 03:01:47

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the xfs tree

Hi all,

After merging the xfs tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

ERROR: ".xfs_extent_busy_trim" [fs/xfs/xfs.ko] undefined!

Caused by commit e459df5b5b93 ("xfs: move busy extent handling to it's
own file") (and aided by 425dcd6c2289 "xfs: clean up busy extent naming").

I have used the xfs tree from next-20120508 for today.
--
Cheers,
Stephen Rothwell [email protected]


Attachments:
(No filename) (437.00 B)
(No filename) (836.00 B)
Download all attachments

2012-05-10 18:28:51

by Ben Myers

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the xfs tree

On Thu, May 10, 2012 at 01:01:34PM +1000, Stephen Rothwell wrote:
> After merging the xfs tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> ERROR: ".xfs_extent_busy_trim" [fs/xfs/xfs.ko] undefined!
>
> Caused by commit e459df5b5b93 ("xfs: move busy extent handling to it's
> own file") (and aided by 425dcd6c2289 "xfs: clean up busy extent naming").
>
> I have used the xfs tree from next-20120508 for today.

Thanks Stephen. The following should resolve the issue.

Regards,
Ben



xfs: make xfs_extent_busy_trim not static

Commit e459df5, 'xfs: move busy extent handling to it's own file'
moved some code from xfs_alloc.c into xfs_extent_busy.c for
convenience in userspace code merges. One of the functions moved is
xfs_extent_busy_trim (formerly xfs_alloc_busy_trim) which is defined
STATIC. Unfortunately this function is still used in xfs_alloc.c, and
this results in an undefined symbol in xfs.ko.

Make xfs_extent_busy_trim not static and add its prototype to
xfs_extent_busy.h.

Signed-off-by: Ben Myers <[email protected]>

Index: xfs/fs/xfs/xfs_alloc.c
===================================================================
--- xfs.orig/fs/xfs/xfs_alloc.c
+++ xfs/fs/xfs/xfs_alloc.c
@@ -47,8 +47,6 @@ STATIC int xfs_alloc_ag_vextent_near(xfs
STATIC int xfs_alloc_ag_vextent_size(xfs_alloc_arg_t *);
STATIC int xfs_alloc_ag_vextent_small(xfs_alloc_arg_t *,
xfs_btree_cur_t *, xfs_agblock_t *, xfs_extlen_t *, int *);
-STATIC void xfs_extent_busy_trim(struct xfs_alloc_arg *,
- xfs_agblock_t, xfs_extlen_t, xfs_agblock_t *, xfs_extlen_t *);

/*
* Lookup the record equal to [bno, len] in the btree given by cur.
Index: xfs/fs/xfs/xfs_extent_busy.c
===================================================================
--- xfs.orig/fs/xfs/xfs_extent_busy.c
+++ xfs/fs/xfs/xfs_extent_busy.c
@@ -345,7 +345,7 @@ restart:
* args->minlen no suitable extent could be found, and the higher level
* code needs to force out the log and retry the allocation.
*/
-STATIC void
+void
xfs_extent_busy_trim(
struct xfs_alloc_arg *args,
xfs_agblock_t bno,
Index: xfs/fs/xfs/xfs_extent_busy.h
===================================================================
--- xfs.orig/fs/xfs/xfs_extent_busy.h
+++ xfs/fs/xfs/xfs_extent_busy.h
@@ -54,6 +54,10 @@ void
xfs_extent_busy_reuse(struct xfs_mount *mp, xfs_agnumber_t agno,
xfs_agblock_t fbno, xfs_extlen_t flen, bool userdata);

+void
+xfs_extent_busy_trim(struct xfs_alloc_arg *args, xfs_agblock_t bno,
+ xfs_extlen_t len, xfs_agblock_t *rbno, xfs_extlen_t *rlen);
+
int
xfs_extent_busy_ag_cmp(void *priv, struct list_head *a, struct list_head *b);

2012-05-10 18:36:20

by Mark Tinguely

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the xfs tree

On 05/10/12 13:32, Ben Myers wrote:

> Signed-off-by: Ben Myers<[email protected]>
>
> Index: xfs/fs/xfs/xfs_alloc.c
> ===================================================================
> --- xfs.orig/fs/xfs/xfs_alloc.c
> +++ xfs/fs/xfs/xfs_alloc.c
> @@ -47,8 +47,6 @@ STATIC int xfs_alloc_ag_vextent_near(xfs
> STATIC int xfs_alloc_ag_vextent_size(xfs_alloc_arg_t *);
> STATIC int xfs_alloc_ag_vextent_small(xfs_alloc_arg_t *,
> xfs_btree_cur_t *, xfs_agblock_t *, xfs_extlen_t *, int *);
> -STATIC void xfs_extent_busy_trim(struct xfs_alloc_arg *,
> - xfs_agblock_t, xfs_extlen_t, xfs_agblock_t *, xfs_extlen_t *);
>
> /*
> * Lookup the record equal to [bno, len] in the btree given by cur.
> Index: xfs/fs/xfs/xfs_extent_busy.c
> ===================================================================
> --- xfs.orig/fs/xfs/xfs_extent_busy.c
> +++ xfs/fs/xfs/xfs_extent_busy.c
> @@ -345,7 +345,7 @@ restart:
> * args->minlen no suitable extent could be found, and the higher level
> * code needs to force out the log and retry the allocation.
> */
> -STATIC void
> +void
> xfs_extent_busy_trim(
> struct xfs_alloc_arg *args,
> xfs_agblock_t bno,
> Index: xfs/fs/xfs/xfs_extent_busy.h
> ===================================================================
> --- xfs.orig/fs/xfs/xfs_extent_busy.h
> +++ xfs/fs/xfs/xfs_extent_busy.h
> @@ -54,6 +54,10 @@ void
> xfs_extent_busy_reuse(struct xfs_mount *mp, xfs_agnumber_t agno,
> xfs_agblock_t fbno, xfs_extlen_t flen, bool userdata);
>
> +void
> +xfs_extent_busy_trim(struct xfs_alloc_arg *args, xfs_agblock_t bno,
> + xfs_extlen_t len, xfs_agblock_t *rbno, xfs_extlen_t *rlen);
> +
> int
> xfs_extent_busy_ag_cmp(void *priv, struct list_head *a, struct list_head *b);
>
>

Hmmm, I saw that before. I have been hand patching that to test.

Looks good.

Reviewed-by: Mark Tinguely <[email protected]>

2012-05-10 18:39:27

by Ben Myers

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the xfs tree

On Thu, May 10, 2012 at 01:36:14PM -0500, Mark Tinguely wrote:
> On 05/10/12 13:32, Ben Myers wrote:
>
> >Signed-off-by: Ben Myers<[email protected]>
> >
> >Index: xfs/fs/xfs/xfs_alloc.c
> >===================================================================
> >--- xfs.orig/fs/xfs/xfs_alloc.c
> >+++ xfs/fs/xfs/xfs_alloc.c
> >@@ -47,8 +47,6 @@ STATIC int xfs_alloc_ag_vextent_near(xfs
> > STATIC int xfs_alloc_ag_vextent_size(xfs_alloc_arg_t *);
> > STATIC int xfs_alloc_ag_vextent_small(xfs_alloc_arg_t *,
> > xfs_btree_cur_t *, xfs_agblock_t *, xfs_extlen_t *, int *);
> >-STATIC void xfs_extent_busy_trim(struct xfs_alloc_arg *,
> >- xfs_agblock_t, xfs_extlen_t, xfs_agblock_t *, xfs_extlen_t *);
> >
> > /*
> > * Lookup the record equal to [bno, len] in the btree given by cur.
> >Index: xfs/fs/xfs/xfs_extent_busy.c
> >===================================================================
> >--- xfs.orig/fs/xfs/xfs_extent_busy.c
> >+++ xfs/fs/xfs/xfs_extent_busy.c
> >@@ -345,7 +345,7 @@ restart:
> > * args->minlen no suitable extent could be found, and the higher level
> > * code needs to force out the log and retry the allocation.
> > */
> >-STATIC void
> >+void
> > xfs_extent_busy_trim(
> > struct xfs_alloc_arg *args,
> > xfs_agblock_t bno,
> >Index: xfs/fs/xfs/xfs_extent_busy.h
> >===================================================================
> >--- xfs.orig/fs/xfs/xfs_extent_busy.h
> >+++ xfs/fs/xfs/xfs_extent_busy.h
> >@@ -54,6 +54,10 @@ void
> > xfs_extent_busy_reuse(struct xfs_mount *mp, xfs_agnumber_t agno,
> > xfs_agblock_t fbno, xfs_extlen_t flen, bool userdata);
> >
> >+void
> >+xfs_extent_busy_trim(struct xfs_alloc_arg *args, xfs_agblock_t bno,
> >+ xfs_extlen_t len, xfs_agblock_t *rbno, xfs_extlen_t *rlen);
> >+
> > int
> > xfs_extent_busy_ag_cmp(void *priv, struct list_head *a, struct list_head *b);
> >
> >
>
> Hmmm, I saw that before. I have been hand patching that to test.
>
> Looks good.
>
> Reviewed-by: Mark Tinguely <[email protected]>

CONFIG_XFS_DEBUG clears the #define of STATIC. That's where this went off the
rails.

Thanks,
Ben