* [PATCH v2] xfsprogs: provide a few compatibility typedefs
@ 2019-08-30 15:03 Christoph Hellwig
2019-08-30 15:09 ` Darrick J. Wong
2019-09-02 3:43 ` Murphy Zhou
0 siblings, 2 replies; 4+ messages in thread
From: Christoph Hellwig @ 2019-08-30 15:03 UTC (permalink / raw)
To: linux-xfs; +Cc: Murphy Zhou
Add back four typedefs that allow xfsdump to compile against the
headers from the latests xfsprogs.
Reported-by: Murphy Zhou <jencce.kernel@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
include/xfs.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/include/xfs.h b/include/xfs.h
index f2f675df..35435b18 100644
--- a/include/xfs.h
+++ b/include/xfs.h
@@ -37,4 +37,13 @@ extern int xfs_assert_largefile[sizeof(off_t)-8];
#include <xfs/xfs_types.h>
#include <xfs/xfs_fs.h>
+/*
+ * Backards compatibility for users of this header, now that the kernel
+ * removed these typedefs from xfs_fs.h.
+ */
+typedef struct xfs_bstat xfs_bstat_t;
+typedef struct xfs_fsop_bulkreq xfs_fsop_bulkreq_t;
+typedef struct xfs_fsop_geom_v1 xfs_fsop;
+typedef struct xfs_inogrp xfs_inogrp_t;
+
#endif /* __XFS_H__ */
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] xfsprogs: provide a few compatibility typedefs
2019-08-30 15:03 [PATCH v2] xfsprogs: provide a few compatibility typedefs Christoph Hellwig
@ 2019-08-30 15:09 ` Darrick J. Wong
2019-09-02 3:43 ` Murphy Zhou
1 sibling, 0 replies; 4+ messages in thread
From: Darrick J. Wong @ 2019-08-30 15:09 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-xfs, Murphy Zhou
On Fri, Aug 30, 2019 at 05:03:27PM +0200, Christoph Hellwig wrote:
> Add back four typedefs that allow xfsdump to compile against the
> headers from the latests xfsprogs.
>
> Reported-by: Murphy Zhou <jencce.kernel@gmail.com>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
LGTM,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> ---
> include/xfs.h | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/include/xfs.h b/include/xfs.h
> index f2f675df..35435b18 100644
> --- a/include/xfs.h
> +++ b/include/xfs.h
> @@ -37,4 +37,13 @@ extern int xfs_assert_largefile[sizeof(off_t)-8];
> #include <xfs/xfs_types.h>
> #include <xfs/xfs_fs.h>
>
> +/*
> + * Backards compatibility for users of this header, now that the kernel
> + * removed these typedefs from xfs_fs.h.
> + */
> +typedef struct xfs_bstat xfs_bstat_t;
> +typedef struct xfs_fsop_bulkreq xfs_fsop_bulkreq_t;
> +typedef struct xfs_fsop_geom_v1 xfs_fsop;
> +typedef struct xfs_inogrp xfs_inogrp_t;
> +
> #endif /* __XFS_H__ */
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] xfsprogs: provide a few compatibility typedefs
2019-08-30 15:03 [PATCH v2] xfsprogs: provide a few compatibility typedefs Christoph Hellwig
2019-08-30 15:09 ` Darrick J. Wong
@ 2019-09-02 3:43 ` Murphy Zhou
2019-09-02 17:09 ` Christoph Hellwig
1 sibling, 1 reply; 4+ messages in thread
From: Murphy Zhou @ 2019-09-02 3:43 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-xfs, Murphy Zhou
On Fri, Aug 30, 2019 at 05:03:27PM +0200, Christoph Hellwig wrote:
> Add back four typedefs that allow xfsdump to compile against the
> headers from the latests xfsprogs.
>
> Reported-by: Murphy Zhou <jencce.kernel@gmail.com>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> include/xfs.h | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/include/xfs.h b/include/xfs.h
> index f2f675df..35435b18 100644
> --- a/include/xfs.h
> +++ b/include/xfs.h
> @@ -37,4 +37,13 @@ extern int xfs_assert_largefile[sizeof(off_t)-8];
> #include <xfs/xfs_types.h>
> #include <xfs/xfs_fs.h>
>
> +/*
> + * Backards compatibility for users of this header, now that the kernel
> + * removed these typedefs from xfs_fs.h.
> + */
> +typedef struct xfs_bstat xfs_bstat_t;
> +typedef struct xfs_fsop_bulkreq xfs_fsop_bulkreq_t;
> +typedef struct xfs_fsop_geom_v1 xfs_fsop;
Still got build failure about this one.
Either change this line to:
+typedef struct xfs_fsop_geom_v1 xfs_fsop_geom_v1_t;
Or delete this line add this in xfsdump:
---
diff --git a/common/fs.c b/common/fs.c
index a4c175c..ff8c75a 100644
--- a/common/fs.c
+++ b/common/fs.c
@@ -204,7 +204,7 @@ fs_mounted(char *typs, char *chrs, char *mnts, uuid_t *idp)
int
fs_getid(char *mnts, uuid_t *idb)
{
- xfs_fsop_geom_v1_t geo;
+ struct xfs_fsop_geom_v1 geo;
int fd;
fd = open(mnts, O_RDONLY);
---
I prefer the later one since it's the only one, no need for a typedef.
Thanks,
Murphy
> +typedef struct xfs_inogrp xfs_inogrp_t;
> +
> #endif /* __XFS_H__ */
> --
> 2.20.1
>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] xfsprogs: provide a few compatibility typedefs
2019-09-02 3:43 ` Murphy Zhou
@ 2019-09-02 17:09 ` Christoph Hellwig
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2019-09-02 17:09 UTC (permalink / raw)
To: Murphy Zhou; +Cc: Christoph Hellwig, linux-xfs
On Mon, Sep 02, 2019 at 11:43:49AM +0800, Murphy Zhou wrote:
> > +/*
> > + * Backards compatibility for users of this header, now that the kernel
> > + * removed these typedefs from xfs_fs.h.
> > + */
> > +typedef struct xfs_bstat xfs_bstat_t;
> > +typedef struct xfs_fsop_bulkreq xfs_fsop_bulkreq_t;
> > +typedef struct xfs_fsop_geom_v1 xfs_fsop;
>
> Still got build failure about this one.
>
> Either change this line to:
>
> +typedef struct xfs_fsop_geom_v1 xfs_fsop_geom_v1_t;
Yes, that is correct. I'm obviously not competent enough to send
userspace patches :)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-09-02 17:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-30 15:03 [PATCH v2] xfsprogs: provide a few compatibility typedefs Christoph Hellwig
2019-08-30 15:09 ` Darrick J. Wong
2019-09-02 3:43 ` Murphy Zhou
2019-09-02 17:09 ` Christoph Hellwig
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).