Re: [PATCH 09/23] libxlog: remove the global libxfs_xinit x structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 11, 2023 at 05:37:28PM +0100, Christoph Hellwig wrote:
> There is no need to export a libxfs_xinit with the somewhat unsuitable
> name x from libxlog.  Move it into the tools linking against libxlog
> that actually need it.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Reviewed-by: Carlos Maiolino <cmaiolino@xxxxxxxxxx>

> ---
>  db/init.c           | 1 +
>  include/libxlog.h   | 3 ---
>  libxlog/util.c      | 1 -
>  logprint/logprint.c | 1 +
>  repair/globals.h    | 2 ++
>  repair/init.c       | 2 ++
>  6 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/db/init.c b/db/init.c
> index 18d9dfdd9..eceaf576c 100644
> --- a/db/init.c
> +++ b/db/init.c
> @@ -27,6 +27,7 @@ static struct xfs_mount	xmount;
>  struct xfs_mount	*mp;
>  static struct xlog	xlog;
>  xfs_agnumber_t		cur_agno = NULLAGNUMBER;
> +libxfs_init_t		x;
> 
>  static void
>  usage(void)
> diff --git a/include/libxlog.h b/include/libxlog.h
> index 57f39e4e8..3948c0b8d 100644
> --- a/include/libxlog.h
> +++ b/include/libxlog.h
> @@ -68,9 +68,6 @@ extern int	print_exit;
>  extern int	print_skip_uuid;
>  extern int	print_record_header;
> 
> -/* libxfs parameters */
> -extern libxfs_init_t	x;
> -
>  void xlog_init(struct xfs_mount *mp, struct xlog *log);
>  int xlog_is_dirty(struct xfs_mount *mp, struct xlog *log);
> 
> diff --git a/libxlog/util.c b/libxlog/util.c
> index d1377c2e2..6e21f1a89 100644
> --- a/libxlog/util.c
> +++ b/libxlog/util.c
> @@ -10,7 +10,6 @@
>  int print_exit;
>  int print_skip_uuid;
>  int print_record_header;
> -libxfs_init_t x;
> 
>  void
>  xlog_init(
> diff --git a/logprint/logprint.c b/logprint/logprint.c
> index bcdb6b359..1a096fa79 100644
> --- a/logprint/logprint.c
> +++ b/logprint/logprint.c
> @@ -25,6 +25,7 @@ int	print_overwrite;
>  int     print_no_data;
>  int     print_no_print;
>  static int	print_operation = OP_PRINT;
> +static struct libxfs_xinit x;
> 
>  static void
>  usage(void)
> diff --git a/repair/globals.h b/repair/globals.h
> index b65e4a2d0..f2952d8b4 100644
> --- a/repair/globals.h
> +++ b/repair/globals.h
> @@ -169,4 +169,6 @@ extern int		thread_count;
>  /* If nonzero, simulate failure after this phase. */
>  extern int		fail_after_phase;
> 
> +extern libxfs_init_t	x;
> +
>  #endif /* _XFS_REPAIR_GLOBAL_H */
> diff --git a/repair/init.c b/repair/init.c
> index 6d019b393..6e3548b32 100644
> --- a/repair/init.c
> +++ b/repair/init.c
> @@ -18,6 +18,8 @@
>  #include "libfrog/dahashselftest.h"
>  #include <sys/resource.h>
> 
> +struct libxfs_xinit	x;
> +
>  static void
>  ts_create(void)
>  {
> --
> 2.39.2
> 




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux