From: Andrew Price <anprice@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 5/8] Remove GFS2_HAS_RG_SKIP conditionals
Date: Mon, 19 Apr 2021 20:11:14 +0100 [thread overview]
Message-ID: <20210419191117.297653-6-anprice@redhat.com> (raw)
In-Reply-To: <20210419191117.297653-1-anprice@redhat.com>
Our own gfs2_ondisk.h has rg_skip so there's no need for these
conditionals.
Signed-off-by: Andrew Price <anprice@redhat.com>
---
configure.ac | 2 --
gfs2/libgfs2/meta.c | 4 ----
gfs2/libgfs2/ondisk.c | 12 ------------
gfs2/libgfs2/rgrp.c | 2 --
4 files changed, 20 deletions(-)
diff --git a/configure.ac b/configure.ac
index a512f9dd..31cb3e49 100644
--- a/configure.ac
+++ b/configure.ac
@@ -126,8 +126,6 @@ AC_SUBST([udevdir], [$with_udevdir])
AC_CHECK_HEADERS([fcntl.h libintl.h limits.h locale.h mntent.h stddef.h sys/file.h sys/ioctl.h sys/mount.h sys/time.h sys/vfs.h syslog.h termios.h])
AC_CHECK_HEADER([linux/fs.h], [], [AC_MSG_ERROR([Unable to find linux/fs.h])])
AC_CHECK_HEADER([linux/limits.h], [], [AC_MSG_ERROR([Unable to find linux/limits.h])])
-AC_CHECK_MEMBER([struct gfs2_rgrp.rg_skip],[AC_DEFINE([GFS2_HAS_RG_SKIP],[],[Next resource group pointer])],
- [], [[#include <linux/gfs2_ondisk.h>]])
AC_CHECK_MEMBER([struct gfs2_rgrp.rg_data0],[AC_DEFINE([GFS2_HAS_RG_RI_FIELDS],[],[Resource group fields duplicated from the rindex])],
[], [[#include <linux/gfs2_ondisk.h>]])
AC_CHECK_MEMBER([struct gfs2_log_header.lh_crc],[AC_DEFINE([GFS2_HAS_LH_V2],[],[v2 log header format])],
diff --git a/gfs2/libgfs2/meta.c b/gfs2/libgfs2/meta.c
index d642424a..c209c70a 100644
--- a/gfs2/libgfs2/meta.c
+++ b/gfs2/libgfs2/meta.c
@@ -225,11 +225,7 @@ MH(rg_header)
F(rg_flags)
F(rg_free, .flags = LGFS2_MFF_FSBLOCKS)
F(rg_dinodes, .flags = LGFS2_MFF_FSBLOCKS)
-#ifdef GFS2_HAS_RG_SKIP
FP(rg_skip, .points_to = (1 << LGFS2_MT_GFS2_RGRP))
-#else
-RF(__pad)
-#endif
F(rg_igeneration)
#ifdef GFS2_HAS_RG_RI_FIELDS
FP(rg_data0, .points_to = ANY_GFS2_BLOCK|(1 << LGFS2_MT_FREE))
diff --git a/gfs2/libgfs2/ondisk.c b/gfs2/libgfs2/ondisk.c
index 6e969143..cf81005e 100644
--- a/gfs2/libgfs2/ondisk.c
+++ b/gfs2/libgfs2/ondisk.c
@@ -208,11 +208,7 @@ void gfs2_rgrp_in(struct gfs2_rgrp *rg, char *buf)
CPIN_32(rg, str, rg_flags);
CPIN_32(rg, str, rg_free);
CPIN_32(rg, str, rg_dinodes);
-#ifdef GFS2_HAS_RG_SKIP
CPIN_32(rg, str, rg_skip);
-#else
- CPIN_32(rg, str, __pad);
-#endif
CPIN_64(rg, str, rg_igeneration);
#ifdef GFS2_HAS_RG_RI_FIELDS
CPIN_64(rg, str, rg_data0);
@@ -231,11 +227,7 @@ void gfs2_rgrp_out(const struct gfs2_rgrp *rg, char *buf)
CPOUT_32(rg, str, rg_flags);
CPOUT_32(rg, str, rg_free);
CPOUT_32(rg, str, rg_dinodes);
-#ifdef GFS2_HAS_RG_SKIP
CPOUT_32(rg, str, rg_skip);
-#else
- CPOUT_32(rg, str, __pad);
-#endif
CPOUT_64(rg, str, rg_igeneration);
#ifdef GFS2_HAS_RG_RI_FIELDS
CPOUT_64(rg, str, rg_data0);
@@ -254,11 +246,7 @@ void gfs2_rgrp_print(const struct gfs2_rgrp *rg)
pv(rg, rg_flags, "%u", "0x%x");
pv(rg, rg_free, "%u", "0x%x");
pv(rg, rg_dinodes, "%u", "0x%x");
-#ifdef GFS2_HAS_RG_SKIP
pv(rg, rg_skip, "%u", "0x%x");
-#else
- pv(rg, __pad, "%u", "0x%x");
-#endif
pv(rg, rg_igeneration, "%llu", "0x%llx");
#ifdef GFS2_HAS_RG_RI_FIELDS
pv(rg, rg_data0, "%llu", "0x%llx");
diff --git a/gfs2/libgfs2/rgrp.c b/gfs2/libgfs2/rgrp.c
index 75fd0ba3..f5eb88c9 100644
--- a/gfs2/libgfs2/rgrp.c
+++ b/gfs2/libgfs2/rgrp.c
@@ -673,9 +673,7 @@ lgfs2_rgrp_t lgfs2_rgrps_append(lgfs2_rgrps_t rgs, struct gfs2_rindex *entry, ui
rg->rg.rg_header.mh_type = GFS2_METATYPE_RG;
rg->rg.rg_header.mh_format = GFS2_FORMAT_RG;
rg->rg.rg_free = rg->ri.ri_data;
-#ifdef GFS2_HAS_RG_SKIP
rg->rg.rg_skip = rg_skip;
-#endif
#ifdef GFS2_HAS_RG_RI_FIELDS
rg->rg.rg_data0 = rg->ri.ri_data0;
rg->rg.rg_data = rg->ri.ri_data;
--
2.30.2
next prev parent reply other threads:[~2021-04-19 19:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-19 19:11 [Cluster-devel] [PATCH v2 0/8] gfs2-utils: Import linux/gfs2_ondisk.h Andrew Price
2021-04-19 19:11 ` [Cluster-devel] [PATCH 1/8] " Andrew Price
2021-04-19 19:35 ` Andreas Gruenbacher
2021-04-19 20:47 ` Andrew Price
2021-04-20 6:00 ` Andreas Gruenbacher
2021-04-20 8:34 ` Andrew Price
2021-04-20 9:07 ` Andreas Gruenbacher
2021-04-20 9:47 ` Andrew Price
2021-04-19 19:11 ` [Cluster-devel] [PATCH 2/8] Remove HAS_UUID conditionals Andrew Price
2021-04-19 19:11 ` [Cluster-devel] [PATCH 3/8] Remove GFS2_HAS_LEAF_HINTS conditionals Andrew Price
2021-04-19 19:11 ` [Cluster-devel] [PATCH 4/8] Remove GFS2_HAS_DE_RAHEAD/COOKIE conditionals Andrew Price
2021-04-19 19:11 ` Andrew Price [this message]
2021-04-19 19:11 ` [Cluster-devel] [PATCH 6/8] Remove GFS2_HAS_RG_RI_FIELDS conditionals Andrew Price
2021-04-19 19:11 ` [Cluster-devel] [PATCH 7/8] Remove GFS2_HAS_LH_V2 conditionals Andrew Price
2021-04-19 19:11 ` [Cluster-devel] [PATCH 8/8] Use PRI* when printing gfs2 structures Andrew Price
2021-04-19 19:31 ` [Cluster-devel] [PATCH v2 0/8] gfs2-utils: Import linux/gfs2_ondisk.h Andreas Gruenbacher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210419191117.297653-6-anprice@redhat.com \
--to=anprice@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.