From: Andrew Price <anprice@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 4/8] Remove GFS2_HAS_DE_RAHEAD/COOKIE conditionals
Date: Mon, 19 Apr 2021 20:11:13 +0100 [thread overview]
Message-ID: <20210419191117.297653-5-anprice@redhat.com> (raw)
In-Reply-To: <20210419191117.297653-1-anprice@redhat.com>
Our own gfs2_ondisk.h has de_rahead and de_cookie so there's no need for
these conditionals.
Signed-off-by: Andrew Price <anprice@redhat.com>
---
configure.ac | 4 ----
gfs2/edit/extended.c | 8 ++------
gfs2/libgfs2/meta.c | 8 --------
gfs2/libgfs2/ondisk.c | 16 ----------------
4 files changed, 2 insertions(+), 34 deletions(-)
diff --git a/configure.ac b/configure.ac
index 5cb0770f..a512f9dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -126,10 +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_dirent.de_rahead],[AC_DEFINE([GFS2_HAS_DE_RAHEAD],[],[Dirent readahead field])],
- [], [[#include <linux/gfs2_ondisk.h>]])
-AC_CHECK_MEMBER([struct gfs2_dirent.de_cookie],[AC_DEFINE([GFS2_HAS_DE_COOKIE],[],[Dirent cookie field])],
- [], [[#include <linux/gfs2_ondisk.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])],
diff --git a/gfs2/edit/extended.c b/gfs2/edit/extended.c
index b8c61ee1..91609bd2 100644
--- a/gfs2/edit/extended.c
+++ b/gfs2/edit/extended.c
@@ -335,18 +335,14 @@ static int display_leaf(struct iinfo *ind)
strcpy(edit_fmt, "%llx");
}
}
- print_gfs2("%d/%d [%08x] %lld/%"PRId64" (0x%llx/0x%"PRIx64") +%u: ",
+ print_gfs2("%d/%d [%08x] %lld/%"PRId64" (0x%llx/0x%"PRIx64") +%"PRIu16": ",
total_dirents, d + 1,
ind->ii[0].dirent[d].dirent.de_hash,
ind->ii[0].dirent[d].dirent.de_inum.no_formal_ino,
ind->ii[0].dirent[d].block,
ind->ii[0].dirent[d].dirent.de_inum.no_formal_ino,
ind->ii[0].dirent[d].block,
-#ifdef GFS2_HAS_DE_RAHEAD
- (unsigned int)ind->ii[0].dirent[d].dirent.de_rahead
-#else
- 0
-#endif
+ ind->ii[0].dirent[d].dirent.de_rahead
);
}
print_inode_type(ind->ii[0].dirent[d].dirent.de_type);
diff --git a/gfs2/libgfs2/meta.c b/gfs2/libgfs2/meta.c
index 2be87045..d642424a 100644
--- a/gfs2/libgfs2/meta.c
+++ b/gfs2/libgfs2/meta.c
@@ -481,17 +481,9 @@ F(de_hash, .flags = LGFS2_MFF_CHECK)
F(de_rec_len, .flags = LGFS2_MFF_BYTES)
F(de_name_len, .flags = LGFS2_MFF_BYTES)
F(de_type)
-#ifdef GFS2_HAS_DE_RAHEAD
F(de_rahead)
-#ifdef GFS2_HAS_DE_COOKIE
F(de_cookie)
RF(pad3)
-#else
-RF(pad2)
-#endif /* GFS2_HAS_DE_COOKIE */
-#else
-RF(__pad)
-#endif /* GFS2_HAS_DE_RAHEAD */
};
#undef STRUCT
diff --git a/gfs2/libgfs2/ondisk.c b/gfs2/libgfs2/ondisk.c
index dffd2221..6e969143 100644
--- a/gfs2/libgfs2/ondisk.c
+++ b/gfs2/libgfs2/ondisk.c
@@ -404,17 +404,9 @@ void gfs2_dirent_in(struct gfs2_dirent *de, char *buf)
CPIN_16(de, str, de_rec_len);
CPIN_16(de, str, de_name_len);
CPIN_16(de, str, de_type);
-#ifdef GFS2_HAS_DE_RAHEAD
CPIN_16(de, str, de_rahead);
-#ifdef GFS2_HAS_DE_COOKIE
CPIN_32(de, str, de_cookie);
CPIN_08(de, str, pad3, 8);
-#else
- CPIN_08(de, str, pad2, 12);
-#endif /* GFS2_HAS_DE_COOKIE */
-#else
- CPIN_08(de, str, __pad, 14);
-#endif /* GFS2_HAS_DE_RAHEAD */
}
void gfs2_dirent_out(struct gfs2_dirent *de, char *buf)
@@ -426,17 +418,9 @@ void gfs2_dirent_out(struct gfs2_dirent *de, char *buf)
CPOUT_16(de, str, de_rec_len);
CPOUT_16(de, str, de_name_len);
CPOUT_16(de, str, de_type);
-#ifdef GFS2_HAS_DE_RAHEAD
CPOUT_16(de, str, de_rahead);
-#ifdef GFS2_HAS_DE_COOKIE
CPOUT_32(de, str, de_cookie);
CPOUT_08(de, str, pad3, 8);
-#else
- CPOUT_08(de, str, pad2, 12);
-#endif /* GFS2_HAS_DE_COOKIE */
-#else
- CPOUT_08(de, str, __pad, 14);
-#endif /* GFS2_HAS_DE_RAHEAD */
}
void gfs2_leaf_in(struct gfs2_leaf *lf, char *buf)
--
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 ` Andrew Price [this message]
2021-04-19 19:11 ` [Cluster-devel] [PATCH 5/8] Remove GFS2_HAS_RG_SKIP conditionals Andrew Price
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-5-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 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).