* [xfstests PATCH] loggen: remove deprecated header includes and add definition for XFS_TRANS_MAGIC
@ 2014-05-12 12:46 Jeff Layton
2014-05-12 23:00 ` Dave Chinner
0 siblings, 1 reply; 6+ messages in thread
From: Jeff Layton @ 2014-05-12 12:46 UTC (permalink / raw)
To: xfs
xfstests was failing to build on my rawhide box. The problem was that
some of the headers included by loggen.c no longer exist in current
releases. This just removes those includes and adds a conditional
definition of XFS_TRANS_MAGIC.
It may make more sense to just move XFS_TRANS_MAGIC to a different
header, but this seems to work on both f20 and rawhide boxes.
Signed-off-by: Jeff Layton <jlayton@poochiereds.net>
---
src/loggen.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/loggen.c b/src/loggen.c
index 522c9178ee26..1740732249b6 100644
--- a/src/loggen.c
+++ b/src/loggen.c
@@ -26,8 +26,6 @@
*/
#include <xfs/libxfs.h>
-#include <xfs/xfs_log.h>
-#include <xfs/xfs_log_priv.h>
#ifndef ASSIGN_ANY_LSN_DISK
#define ASSIGN_ANY_LSN_DISK(lsn,cycle,block) \
@@ -37,6 +35,10 @@
}
#endif
+#ifndef XFS_TRANS_MAGIC
+#define XFS_TRANS_MAGIC 0x5452414E /* 'TRAN' */
+#endif
+
void
usage(void)
{
--
1.9.0
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [xfstests PATCH] loggen: remove deprecated header includes and add definition for XFS_TRANS_MAGIC
2014-05-12 12:46 [xfstests PATCH] loggen: remove deprecated header includes and add definition for XFS_TRANS_MAGIC Jeff Layton
@ 2014-05-12 23:00 ` Dave Chinner
2014-05-13 0:35 ` Jeff Layton
2014-05-13 11:54 ` [PATCH] loggen: fix build vs. newer xfsprogs headers Jeff Layton
0 siblings, 2 replies; 6+ messages in thread
From: Dave Chinner @ 2014-05-12 23:00 UTC (permalink / raw)
To: Jeff Layton; +Cc: xfs
On Mon, May 12, 2014 at 08:46:35AM -0400, Jeff Layton wrote:
> xfstests was failing to build on my rawhide box. The problem was that
> some of the headers included by loggen.c no longer exist in current
> releases. This just removes those includes and adds a conditional
> definition of XFS_TRANS_MAGIC.
>
> It may make more sense to just move XFS_TRANS_MAGIC to a different
> header, but this seems to work on both f20 and rawhide boxes.
>
> Signed-off-by: Jeff Layton <jlayton@poochiereds.net>
> ---
> src/loggen.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/loggen.c b/src/loggen.c
> index 522c9178ee26..1740732249b6 100644
> --- a/src/loggen.c
> +++ b/src/loggen.c
> @@ -26,8 +26,6 @@
> */
>
> #include <xfs/libxfs.h>
> -#include <xfs/xfs_log.h>
> -#include <xfs/xfs_log_priv.h>
>
> #ifndef ASSIGN_ANY_LSN_DISK
> #define ASSIGN_ANY_LSN_DISK(lsn,cycle,block) \
> @@ -37,6 +35,10 @@
> }
> #endif
>
> +#ifndef XFS_TRANS_MAGIC
> +#define XFS_TRANS_MAGIC 0x5452414E /* 'TRAN' */
> +#endif
It's now defined as XFS_TRANS_HEADER_MAGIC, and defined in
xfs/xfs_log_format.h.
So, some autoconf magic, perhaps?
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [xfstests PATCH] loggen: remove deprecated header includes and add definition for XFS_TRANS_MAGIC
2014-05-12 23:00 ` Dave Chinner
@ 2014-05-13 0:35 ` Jeff Layton
2014-05-13 11:54 ` [PATCH] loggen: fix build vs. newer xfsprogs headers Jeff Layton
1 sibling, 0 replies; 6+ messages in thread
From: Jeff Layton @ 2014-05-13 0:35 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfs
On Tue, 13 May 2014 09:00:49 +1000
Dave Chinner <david@fromorbit.com> wrote:
> On Mon, May 12, 2014 at 08:46:35AM -0400, Jeff Layton wrote:
> > xfstests was failing to build on my rawhide box. The problem was that
> > some of the headers included by loggen.c no longer exist in current
> > releases. This just removes those includes and adds a conditional
> > definition of XFS_TRANS_MAGIC.
> >
> > It may make more sense to just move XFS_TRANS_MAGIC to a different
> > header, but this seems to work on both f20 and rawhide boxes.
> >
> > Signed-off-by: Jeff Layton <jlayton@poochiereds.net>
> > ---
> > src/loggen.c | 6 ++++--
> > 1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/src/loggen.c b/src/loggen.c
> > index 522c9178ee26..1740732249b6 100644
> > --- a/src/loggen.c
> > +++ b/src/loggen.c
> > @@ -26,8 +26,6 @@
> > */
> >
> > #include <xfs/libxfs.h>
> > -#include <xfs/xfs_log.h>
> > -#include <xfs/xfs_log_priv.h>
> >
> > #ifndef ASSIGN_ANY_LSN_DISK
> > #define ASSIGN_ANY_LSN_DISK(lsn,cycle,block) \
> > @@ -37,6 +35,10 @@
> > }
> > #endif
> >
> > +#ifndef XFS_TRANS_MAGIC
> > +#define XFS_TRANS_MAGIC 0x5452414E /* 'TRAN' */
> > +#endif
>
> It's now defined as XFS_TRANS_HEADER_MAGIC, and defined in
> xfs/xfs_log_format.h.
>
> So, some autoconf magic, perhaps?
>
> Cheers,
>
> Dave.
Ok, I'll see what I can cook up.
Thanks,
--
Jeff Layton <jlayton@poochiereds.net>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] loggen: fix build vs. newer xfsprogs headers
2014-05-12 23:00 ` Dave Chinner
2014-05-13 0:35 ` Jeff Layton
@ 2014-05-13 11:54 ` Jeff Layton
2014-05-13 12:00 ` Jeff Layton
2014-05-13 12:04 ` [xfstests PATCH v2] " Jeff Layton
1 sibling, 2 replies; 6+ messages in thread
From: Jeff Layton @ 2014-05-13 11:54 UTC (permalink / raw)
To: xfs
commit cc085d770adb in xfsprogs removed some header files that are
included by loggen.c. Add an autoconf test that checks to see whether
xfs_log_format.h is present. If it is, include that instead of the
deprecated headers and add an alias for XFS_TRANS_MAGIC since that
value no longer exists.
W.ith this patch, xfstests builds on both f20 and rawhide (f21) boxes.
Signed-off-by: Jeff Layton <jlayton@poochiereds.net>
---
configure.ac | 9 ++++++---
src/loggen.c | 7 +++++++
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 43e6029193a6..e4680544ac82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,14 +26,17 @@ AC_HEADER_STDC
sys/types.h \
strings.h \
err.h \
- linux/falloc.h
- ])
- AC_CHECK_HEADERS([ sys/fs/xfs_fsops.h \
+ linux/falloc.h \
+ sys/fs/xfs_fsops.h \
sys/fs/xfs_itable.h \
xfs/platform_defs.h \
btrfs/ioctl.h \
])
+AC_CHECK_HEADERS([xfs/xfs_log_format.h],,,[#include <xfs/platform_defs.h>
+#include <xfs/xfs_types.h>
+#include <xfs/xfs_fs.h>])
+
AC_PACKAGE_NEED_UUIDCOMPARE
case $pkg_platform
diff --git a/src/loggen.c b/src/loggen.c
index 522c9178ee26..a3d99f8c915f 100644
--- a/src/loggen.c
+++ b/src/loggen.c
@@ -25,9 +25,16 @@
* - dxm 29/09/00
*/
+#include <config.h>
+
#include <xfs/libxfs.h>
+#ifdef HAVE_XFS_XFS_LOG_FORMAT_H
+#include <xfs/xfs_log_format.h>
+#define XFS_TRANS_MAGIC XFS_TRANS_HEADER_MAGIC
+#else /* HAVE_XFS_XFS_LOG_FORMAT_H */
#include <xfs/xfs_log.h>
#include <xfs/xfs_log_priv.h>
+#endif /* HAVE_XFS_XFS_LOG_FORMAT_H */
#ifndef ASSIGN_ANY_LSN_DISK
#define ASSIGN_ANY_LSN_DISK(lsn,cycle,block) \
--
1.9.0
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] loggen: fix build vs. newer xfsprogs headers
2014-05-13 11:54 ` [PATCH] loggen: fix build vs. newer xfsprogs headers Jeff Layton
@ 2014-05-13 12:00 ` Jeff Layton
2014-05-13 12:04 ` [xfstests PATCH v2] " Jeff Layton
1 sibling, 0 replies; 6+ messages in thread
From: Jeff Layton @ 2014-05-13 12:00 UTC (permalink / raw)
To: xfs
On Tue, 13 May 2014 07:54:03 -0400
Jeff Layton <jlayton@poochiereds.net> wrote:
> commit cc085d770adb in xfsprogs removed some header files that are
> included by loggen.c. Add an autoconf test that checks to see whether
> xfs_log_format.h is present. If it is, include that instead of the
> deprecated headers and add an alias for XFS_TRANS_MAGIC since that
> value no longer exists.
>
> W.ith this patch, xfstests builds on both f20 and rawhide (f21) boxes.
>
> Signed-off-by: Jeff Layton <jlayton@poochiereds.net>
> ---
> configure.ac | 9 ++++++---
> src/loggen.c | 7 +++++++
> 2 files changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 43e6029193a6..e4680544ac82 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -26,14 +26,17 @@ AC_HEADER_STDC
> sys/types.h \
> strings.h \
> err.h \
> - linux/falloc.h
> - ])
> - AC_CHECK_HEADERS([ sys/fs/xfs_fsops.h \
> + linux/falloc.h \
> + sys/fs/xfs_fsops.h \
> sys/fs/xfs_itable.h \
> xfs/platform_defs.h \
> btrfs/ioctl.h \
> ])
>
> +AC_CHECK_HEADERS([xfs/xfs_log_format.h],,,[#include <xfs/platform_defs.h>
> +#include <xfs/xfs_types.h>
> +#include <xfs/xfs_fs.h>])
> +
Hmm now that I look closer, loggen.c just includes xfs/libxfs.h in
order to pull in all of the necessary includes. I guess we should do
that here instead of including these headers individually...
I'll respin and resend.
> AC_PACKAGE_NEED_UUIDCOMPARE
>
> case $pkg_platform
> diff --git a/src/loggen.c b/src/loggen.c
> index 522c9178ee26..a3d99f8c915f 100644
> --- a/src/loggen.c
> +++ b/src/loggen.c
> @@ -25,9 +25,16 @@
> * - dxm 29/09/00
> */
>
> +#include <config.h>
> +
> #include <xfs/libxfs.h>
> +#ifdef HAVE_XFS_XFS_LOG_FORMAT_H
> +#include <xfs/xfs_log_format.h>
> +#define XFS_TRANS_MAGIC XFS_TRANS_HEADER_MAGIC
> +#else /* HAVE_XFS_XFS_LOG_FORMAT_H */
> #include <xfs/xfs_log.h>
> #include <xfs/xfs_log_priv.h>
> +#endif /* HAVE_XFS_XFS_LOG_FORMAT_H */
>
> #ifndef ASSIGN_ANY_LSN_DISK
> #define ASSIGN_ANY_LSN_DISK(lsn,cycle,block) \
--
Jeff Layton <jlayton@poochiereds.net>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* [xfstests PATCH v2] loggen: fix build vs. newer xfsprogs headers
2014-05-13 11:54 ` [PATCH] loggen: fix build vs. newer xfsprogs headers Jeff Layton
2014-05-13 12:00 ` Jeff Layton
@ 2014-05-13 12:04 ` Jeff Layton
1 sibling, 0 replies; 6+ messages in thread
From: Jeff Layton @ 2014-05-13 12:04 UTC (permalink / raw)
To: xfs
v2: just include xfs/libxfs.h for the conftest prerequisites
commit cc085d770adb in xfsprogs removed some header files that are
included by loggen.c. Add an autoconf test that checks to see whether
xfs_log_format.h is present. If it is, include that instead of the
deprecated headers and add an alias for XFS_TRANS_MAGIC since that
value no longer exists.
With this patch, xfstests builds on both f20 and rawhide (f21) boxes.
Signed-off-by: Jeff Layton <jlayton@poochiereds.net>
---
configure.ac | 7 ++++---
src/loggen.c | 7 +++++++
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 43e6029193a6..53459d87f930 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,14 +26,15 @@ AC_HEADER_STDC
sys/types.h \
strings.h \
err.h \
- linux/falloc.h
- ])
- AC_CHECK_HEADERS([ sys/fs/xfs_fsops.h \
+ linux/falloc.h \
+ sys/fs/xfs_fsops.h \
sys/fs/xfs_itable.h \
xfs/platform_defs.h \
btrfs/ioctl.h \
])
+AC_CHECK_HEADERS([xfs/xfs_log_format.h],,,[#include <xfs/libxfs.h>])
+
AC_PACKAGE_NEED_UUIDCOMPARE
case $pkg_platform
diff --git a/src/loggen.c b/src/loggen.c
index 522c9178ee26..a3d99f8c915f 100644
--- a/src/loggen.c
+++ b/src/loggen.c
@@ -25,9 +25,16 @@
* - dxm 29/09/00
*/
+#include <config.h>
+
#include <xfs/libxfs.h>
+#ifdef HAVE_XFS_XFS_LOG_FORMAT_H
+#include <xfs/xfs_log_format.h>
+#define XFS_TRANS_MAGIC XFS_TRANS_HEADER_MAGIC
+#else /* HAVE_XFS_XFS_LOG_FORMAT_H */
#include <xfs/xfs_log.h>
#include <xfs/xfs_log_priv.h>
+#endif /* HAVE_XFS_XFS_LOG_FORMAT_H */
#ifndef ASSIGN_ANY_LSN_DISK
#define ASSIGN_ANY_LSN_DISK(lsn,cycle,block) \
--
1.9.0
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-05-13 12:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-12 12:46 [xfstests PATCH] loggen: remove deprecated header includes and add definition for XFS_TRANS_MAGIC Jeff Layton
2014-05-12 23:00 ` Dave Chinner
2014-05-13 0:35 ` Jeff Layton
2014-05-13 11:54 ` [PATCH] loggen: fix build vs. newer xfsprogs headers Jeff Layton
2014-05-13 12:00 ` Jeff Layton
2014-05-13 12:04 ` [xfstests PATCH v2] " Jeff Layton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox