This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch master
in repository gfs2-utils.
commit 364c05246309005810a958c6f8476e854a88400e
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Mon Apr 19 17:49:02 2021 +0100
Remove GFS2_HAS_RG_RI_FIELDS conditionals
Our own gfs2_ondisk.h has the new rgrp fields so there's no need for
these conditionals.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
configure.ac | 2 --
gfs2/libgfs2/meta.c | 2 --
gfs2/libgfs2/ondisk.c | 8 --------
gfs2/libgfs2/rgrp.c | 6 ------
4 files changed, 18 deletions(-)
diff --git a/configure.ac b/configure.ac
index 31cb3e49..e356199c 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_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])],
[], [[#include <linux/gfs2_ondisk.h>]])
diff --git a/gfs2/libgfs2/meta.c b/gfs2/libgfs2/meta.c
index c209c70a..771b1f13 100644
--- a/gfs2/libgfs2/meta.c
+++ b/gfs2/libgfs2/meta.c
@@ -227,12 +227,10 @@ F(rg_free, .flags = LGFS2_MFF_FSBLOCKS)
F(rg_dinodes, .flags = LGFS2_MFF_FSBLOCKS)
FP(rg_skip, .points_to = (1 << LGFS2_MT_GFS2_RGRP))
F(rg_igeneration)
-#ifdef GFS2_HAS_RG_RI_FIELDS
FP(rg_data0, .points_to = ANY_GFS2_BLOCK|(1 << LGFS2_MT_FREE))
F(rg_data, .flags = LGFS2_MFF_FSBLOCKS)
F(rg_bitbytes, .flags = LGFS2_MFF_BYTES)
F(rg_crc, .flags = LGFS2_MFF_CHECK)
-#endif
RF(rg_reserved)
};
diff --git a/gfs2/libgfs2/ondisk.c b/gfs2/libgfs2/ondisk.c
index cf81005e..157f3358 100644
--- a/gfs2/libgfs2/ondisk.c
+++ b/gfs2/libgfs2/ondisk.c
@@ -210,12 +210,10 @@ void gfs2_rgrp_in(struct gfs2_rgrp *rg, char *buf)
CPIN_32(rg, str, rg_dinodes);
CPIN_32(rg, str, rg_skip);
CPIN_64(rg, str, rg_igeneration);
-#ifdef GFS2_HAS_RG_RI_FIELDS
CPIN_64(rg, str, rg_data0);
CPIN_32(rg, str, rg_data);
CPIN_32(rg, str, rg_bitbytes);
CPIN_32(rg, str, rg_crc);
-#endif
CPIN_08(rg, str, rg_reserved, sizeof(rg->rg_reserved));
}
@@ -229,15 +227,11 @@ void gfs2_rgrp_out(const struct gfs2_rgrp *rg, char *buf)
CPOUT_32(rg, str, rg_dinodes);
CPOUT_32(rg, str, rg_skip);
CPOUT_64(rg, str, rg_igeneration);
-#ifdef GFS2_HAS_RG_RI_FIELDS
CPOUT_64(rg, str, rg_data0);
CPOUT_32(rg, str, rg_data);
CPOUT_32(rg, str, rg_bitbytes);
CPOUT_08(rg, str, rg_reserved, sizeof(rg->rg_reserved));
lgfs2_rgrp_crc_set(buf);
-#else
- CPOUT_08(rg, str, rg_reserved, sizeof(rg->rg_reserved));
-#endif
}
void gfs2_rgrp_print(const struct gfs2_rgrp *rg)
@@ -248,12 +242,10 @@ void gfs2_rgrp_print(const struct gfs2_rgrp *rg)
pv(rg, rg_dinodes, "%u", "0x%x");
pv(rg, rg_skip, "%u", "0x%x");
pv(rg, rg_igeneration, "%llu", "0x%llx");
-#ifdef GFS2_HAS_RG_RI_FIELDS
pv(rg, rg_data0, "%llu", "0x%llx");
pv(rg, rg_data, "%u", "0x%x");
pv(rg, rg_bitbytes, "%u", "0x%x");
pv(rg, rg_crc, "%u", "0x%x");
-#endif
}
void gfs2_quota_in(struct gfs2_quota *qu, char *buf)
diff --git a/gfs2/libgfs2/rgrp.c b/gfs2/libgfs2/rgrp.c
index f5eb88c9..aa5eadf2 100644
--- a/gfs2/libgfs2/rgrp.c
+++ b/gfs2/libgfs2/rgrp.c
@@ -156,7 +156,6 @@ void lgfs2_rgrp_bitbuf_free(lgfs2_rgrp_t rg)
int lgfs2_rgrp_crc_check(char *buf)
{
int ret = 0;
-#ifdef GFS2_HAS_RG_RI_FIELDS
struct gfs2_rgrp *rg = (struct gfs2_rgrp *)buf;
uint32_t crc = rg->rg_crc;
@@ -167,7 +166,6 @@ int lgfs2_rgrp_crc_check(char *buf)
if (be32_to_cpu(crc) != gfs2_disk_hash(buf, sizeof(struct gfs2_rgrp)))
ret = 1;
rg->rg_crc = crc;
-#endif
return ret;
}
@@ -176,14 +174,12 @@ int lgfs2_rgrp_crc_check(char *buf)
*/
void lgfs2_rgrp_crc_set(char *buf)
{
-#ifdef GFS2_HAS_RG_RI_FIELDS
struct gfs2_rgrp *rg = (struct gfs2_rgrp *)buf;
uint32_t crc;
rg->rg_crc = 0;
crc = gfs2_disk_hash(buf, sizeof(struct gfs2_rgrp));
rg->rg_crc = cpu_to_be32(crc);
-#endif
}
/**
@@ -674,12 +670,10 @@ lgfs2_rgrp_t lgfs2_rgrps_append(lgfs2_rgrps_t rgs, struct
gfs2_rindex *entry, ui
rg->rg.rg_header.mh_format = GFS2_FORMAT_RG;
rg->rg.rg_free = rg->ri.ri_data;
rg->rg.rg_skip = rg_skip;
-#ifdef GFS2_HAS_RG_RI_FIELDS
rg->rg.rg_data0 = rg->ri.ri_data0;
rg->rg.rg_data = rg->ri.ri_data;
rg->rg.rg_bitbytes = rg->ri.ri_bitbytes;
rg->rg.rg_crc = 0;
-#endif
compute_bitmaps(rg, rgs->sdp->bsize);
rg->rgrps = rgs;
return rg;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.