gfs2-utils: master - gfs2_utils: more gfs2_convert i_goal fixes
by Abhijith Das
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=3f4c4df5...
Commit: 3f4c4df5a03a58f2075a3084b2d10834a158746b
Parent: 14193bbfe3220386ab8e53d28f548f2938d3f1a9
Author: Abhi Das <adas(a)redhat.com>
AuthorDate: Fri Mar 27 13:52:02 2015 -0500
Committer: Abhi Das <adas(a)redhat.com>
CommitterDate: Wed Apr 1 09:45:00 2015 -0500
gfs2_utils: more gfs2_convert i_goal fixes
The correct goal was only being set on files that are >= meta
height 2. This patch fixes this and sets correct goal values for
stuffed, height 1 and jdata files as well
Resolves: rhbz#1186847
Signed-off-by: Abhi Das <adas(a)redhat.com>
---
gfs2/convert/gfs2_convert.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/gfs2/convert/gfs2_convert.c b/gfs2/convert/gfs2_convert.c
index 9a42985..bb4e3a2 100644
--- a/gfs2/convert/gfs2_convert.c
+++ b/gfs2/convert/gfs2_convert.c
@@ -435,9 +435,9 @@ static void jdata_mp_gfs1_to_gfs2(struct gfs2_sbd *sbp, int gfs1_h, int gfs2_h,
}
}
-static void fix_jdatatree(struct gfs2_sbd *sbp, struct gfs2_inode *ip,
- struct blocklist *blk, char *srcptr,
- unsigned int size)
+static uint64_t fix_jdatatree(struct gfs2_sbd *sbp, struct gfs2_inode *ip,
+ struct blocklist *blk, char *srcptr,
+ unsigned int size)
{
uint64_t block;
struct gfs2_buffer_head *bh;
@@ -499,6 +499,7 @@ static void fix_jdatatree(struct gfs2_sbd *sbp, struct gfs2_inode *ip,
amount = size - copied;
ptramt = 0;
}
+ return block;
}
static int get_inode_metablocks(struct gfs2_sbd *sbp, struct gfs2_inode *ip, struct blocklist *blocks)
@@ -620,7 +621,7 @@ static int fix_ind_reg_or_dir(struct gfs2_sbd *sbp, struct gfs2_inode *ip, uint3
blk->height -= di_height - gfs2_hgt;
if (len) {
fix_metatree(sbp, ip, blk, ptr1, len);
- ip->i_di.di_goal_data = ip->i_di.di_goal_meta = be64_to_cpu(*ptr2);
+ ip->i_di.di_goal_meta = be64_to_cpu(*ptr2);
}
return 0;
@@ -687,7 +688,8 @@ static int fix_ind_jdata(struct gfs2_sbd *sbp, struct gfs2_inode *ip, uint32_t d
memcpy(&newblk->mp, &gfs2mp, sizeof(struct metapath));
newblk->height -= di_height - gfs2_hgt;
if (len)
- fix_jdatatree(sbp, ip, newblk, newblk->ptrbuf, len);
+ ip->i_di.di_goal_meta = fix_jdatatree(sbp, ip, newblk,
+ newblk->ptrbuf, len);
free(newblk->ptrbuf);
free(newblk);
}
@@ -705,12 +707,16 @@ static int adjust_indirect_blocks(struct gfs2_sbd *sbp, struct gfs2_inode *ip)
int isdir = S_ISDIR(ip->i_di.di_mode); /* is always jdata */
int isjdata = ((GFS2_DIF_JDATA & ip->i_di.di_flags) && !isdir);
int isreg = (!isjdata && !isdir);
+ int issys = (GFS2_DIF_SYSTEM & ip->i_di.di_flags);
/* regular files and dirs are same upto height=2
jdata files (not dirs) are same only when height=0 */
if (((isreg||isdir) && ip->i_di.di_height <= 1) ||
- (isjdata && ip->i_di.di_height == 0))
+ (isjdata && ip->i_di.di_height == 0)) {
+ if (!issys)
+ ip->i_di.di_goal_meta = ip->i_di.di_num.no_addr;
return 0; /* nothing to do */
+ }
osi_list_init(&blocks.list);
9 years, 1 month
gfs2-utils: RHEL7 - gfs2-utils: more fsck.gfs2 i_goal fixes
by Abhijith Das
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=0ae4bfef...
Commit: 0ae4bfefaaa4915f267ef0533ebc53d44ea4369e
Parent: 8818b681e941282a52ee53514a39735a2b891235
Author: Abhi Das <adas(a)redhat.com>
AuthorDate: Fri Mar 27 13:58:05 2015 -0500
Committer: Abhi Das <adas(a)redhat.com>
CommitterDate: Fri Mar 27 13:58:05 2015 -0500
gfs2-utils: more fsck.gfs2 i_goal fixes
fsck.gfs2 doesn't traverse the metadata tree for dirs in pass1 to
be able to get at the last allocated block for it and attempts to
set it to the inode block itself when it finds the i_goal value to
be outside of the current rgrp. This is not desirable and fsck.gfs2
should probably leave directories alone.
This patch simply skips over directories whose goal blocks fall
within the boundaries of the fs, assuming they are valid.
Resolves: rhbz#1186515
Signed-off-by: Abhi Das <adas(a)redhat.com>
---
gfs2/fsck/metawalk.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/gfs2/fsck/metawalk.c b/gfs2/fsck/metawalk.c
index 3460141..2dc8a32 100644
--- a/gfs2/fsck/metawalk.c
+++ b/gfs2/fsck/metawalk.c
@@ -1931,6 +1931,14 @@ int check_i_goal(struct gfs2_inode *ip, uint64_t goal_blk,
if (sdp->gfs1 || ip->i_di.di_flags & GFS2_DIF_SYSTEM ||
ip->i_di.di_goal_meta == i_block)
return 0;
+ /* Don't fix directory goal blocks unless we know they're wrong.
+ * i.e. out of bounds of the fs. Directories can easily have blocks
+ * outside of the dinode's rgrp and thus we have no way of knowing
+ * if the goal block is bogus or not. */
+ if (is_dir(&ip->i_di, ip->i_sbd->gfs1) &&
+ (ip->i_di.di_goal_meta > sdp->sb_addr &&
+ ip->i_di.di_goal_meta <= sdp->fssize))
+ return 0;
/* We default to the inode block */
if (!goal_blk)
goal_blk = i_block;
9 years, 1 month
gfs2-utils: RHEL7 - gfs2_utils: more gfs2_convert i_goal fixes
by Abhijith Das
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=8818b681...
Commit: 8818b681e941282a52ee53514a39735a2b891235
Parent: 6d89e9dfe83f68ebb05bfb2ef4715cc5fb1aa630
Author: Abhi Das <adas(a)redhat.com>
AuthorDate: Fri Mar 27 13:52:02 2015 -0500
Committer: Abhi Das <adas(a)redhat.com>
CommitterDate: Fri Mar 27 13:52:02 2015 -0500
gfs2_utils: more gfs2_convert i_goal fixes
The correct goal was only being set on files that are >= meta
height 2. This patch fixes this and sets correct goal values for
stuffed, height 1 and jdata files as well
Resolves: rhbz#1186847
Signed-off-by: Abhi Das <adas(a)redhat.com>
---
gfs2/convert/gfs2_convert.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/gfs2/convert/gfs2_convert.c b/gfs2/convert/gfs2_convert.c
index 0b56dd1..1e83222 100644
--- a/gfs2/convert/gfs2_convert.c
+++ b/gfs2/convert/gfs2_convert.c
@@ -435,9 +435,9 @@ static void jdata_mp_gfs1_to_gfs2(struct gfs2_sbd *sbp, int gfs1_h, int gfs2_h,
}
}
-static void fix_jdatatree(struct gfs2_sbd *sbp, struct gfs2_inode *ip,
- struct blocklist *blk, char *srcptr,
- unsigned int size)
+static uint64_t fix_jdatatree(struct gfs2_sbd *sbp, struct gfs2_inode *ip,
+ struct blocklist *blk, char *srcptr,
+ unsigned int size)
{
uint64_t block;
struct gfs2_buffer_head *bh;
@@ -499,6 +499,7 @@ static void fix_jdatatree(struct gfs2_sbd *sbp, struct gfs2_inode *ip,
amount = size - copied;
ptramt = 0;
}
+ return block;
}
static int get_inode_metablocks(struct gfs2_sbd *sbp, struct gfs2_inode *ip, struct blocklist *blocks)
@@ -620,7 +621,7 @@ static int fix_ind_reg_or_dir(struct gfs2_sbd *sbp, struct gfs2_inode *ip, uint3
blk->height -= di_height - gfs2_hgt;
if (len) {
fix_metatree(sbp, ip, blk, ptr1, len);
- ip->i_di.di_goal_data = ip->i_di.di_goal_meta = be64_to_cpu(*ptr2);
+ ip->i_di.di_goal_meta = be64_to_cpu(*ptr2);
}
return 0;
@@ -687,7 +688,8 @@ static int fix_ind_jdata(struct gfs2_sbd *sbp, struct gfs2_inode *ip, uint32_t d
memcpy(&newblk->mp, &gfs2mp, sizeof(struct metapath));
newblk->height -= di_height - gfs2_hgt;
if (len)
- fix_jdatatree(sbp, ip, newblk, newblk->ptrbuf, len);
+ ip->i_di.di_goal_meta = fix_jdatatree(sbp, ip, newblk,
+ newblk->ptrbuf, len);
free(newblk->ptrbuf);
free(newblk);
}
@@ -705,12 +707,16 @@ static int adjust_indirect_blocks(struct gfs2_sbd *sbp, struct gfs2_inode *ip)
int isdir = S_ISDIR(ip->i_di.di_mode); /* is always jdata */
int isjdata = ((GFS2_DIF_JDATA & ip->i_di.di_flags) && !isdir);
int isreg = (!isjdata && !isdir);
+ int issys = (GFS2_DIF_SYSTEM & ip->i_di.di_flags);
/* regular files and dirs are same upto height=2
jdata files (not dirs) are same only when height=0 */
if (((isreg||isdir) && ip->i_di.di_height <= 1) ||
- (isjdata && ip->i_di.di_height == 0))
+ (isjdata && ip->i_di.di_height == 0)) {
+ if (!issys)
+ ip->i_di.di_goal_meta = ip->i_di.di_num.no_addr;
return 0; /* nothing to do */
+ }
osi_list_init(&blocks.list);
9 years, 1 month
gfs2-utils: master - gfs2-utils build: Remove superfluous passive header checks
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=14193bbf...
Commit: 14193bbfe3220386ab8e53d28f548f2938d3f1a9
Parent: 46ca47cf35a03e1d9c57d89b67e84c25a8492a0e
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Tue Mar 31 01:13:18 2015 +0100
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Tue Mar 31 01:18:00 2015 +0100
gfs2-utils build: Remove superfluous passive header checks
The configure script contained passive header and feature checks which
set variables depending on what they find, to be used to make code
portable, but the code does not use those checks. It also duplicated
some checks for standard headers which autoconf already does itself.
Remove the unneeded checks and speed up the configure script a bit.
Also remove some checks for headers which are no longer required (since
the cluster.git split) and remove some unused #includes which were
discovered along the way.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
configure.ac | 39 +++++----------------------------------
gfs2/mkfs/main_grow.c | 3 ---
gfs2/mkfs/main_jadd.c | 1 -
3 files changed, 5 insertions(+), 38 deletions(-)
diff --git a/configure.ac b/configure.ac
index a41eb57..de96e5a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -110,46 +110,17 @@ if test -z "$ncurses_CFLAGS" && test -z "$ncurses_LIBS"; then
ncurses_LIBS=-lncurses
fi
-# external libs (no pkgconfig)
-check_lib_no_libs pthread pthread_mutex_lock
-
# Checks for header files.
-
-AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h libintl.h limits.h locale.h mntent.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/file.h sys/ioctl.h sys/mount.h sys/param.h sys/socket.h sys/time.h sys/vfs.h syslog.h termios.h unistd.h])
-
-AC_CHECK_HEADERS([linux/dlmconstants.h linux/limits.h linux/types.h linux/netlink.h linux/fs.h],,
- [AC_MSG_ERROR([Unable to find all required kernel headers.])])
-
+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/types.h], [], [AC_MSG_ERROR([Unable to find linux/types.h])])
+AC_CHECK_HEADER([linux/limits.h], [], [AC_MSG_ERROR([Unable to find linux/limits.h])])
AC_CHECK_HEADER([linux/gfs2_ondisk.h], [], [AC_MSG_ERROR([Unable to find linux/gfs2_ondisk.h])])
AC_CHECK_MEMBER([struct gfs2_sb.sb_uuid], [], [], [[#include <linux/gfs2_ondisk.h>]])
AC_CHECK_MEMBER([struct gfs2_leaf.lf_inode],[AC_DEFINE([GFS2_HAS_LEAF_HINTS],[],[Leaf block hints])],
[], [[#include <linux/gfs2_ondisk.h>]])
-# Checks for typedefs, structures, and compiler characteristics.
-AC_C_INLINE
-AC_TYPE_INT64_T
-AC_TYPE_MODE_T
-AC_TYPE_OFF_T
-AC_TYPE_PID_T
-AC_TYPE_SIZE_T
-AC_TYPE_SSIZE_T
-AC_STRUCT_ST_BLOCKS
-AC_TYPE_UINT16_T
-AC_TYPE_UINT32_T
-AC_TYPE_UINT64_T
-AC_TYPE_UINT8_T
-
-# Checks for library functions.
-AC_FUNC_CHOWN
-AC_FUNC_FORK
-AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
-AC_HEADER_MAJOR
-AC_FUNC_MALLOC
-AC_FUNC_REALLOC
-AC_CHECK_FUNCS([ftruncate gettimeofday memset realpath rmdir select setlocale socket strcasecmp strchr strdup strerror strstr])
-
-## *FLAGS handling
-
+# *FLAGS handling
ENV_CFLAGS="$CFLAGS"
ENV_CPPFLAGS="$CPPFLAGS"
ENV_LDFLAGS="$LDFLAGS"
diff --git a/gfs2/mkfs/main_grow.c b/gfs2/mkfs/main_grow.c
index 6ba14b0..1115e5f 100644
--- a/gfs2/mkfs/main_grow.c
+++ b/gfs2/mkfs/main_grow.c
@@ -9,8 +9,6 @@
#include <dirent.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
-#include <sys/file.h>
-#include <sys/vfs.h>
#include <sys/mount.h>
#include <fcntl.h>
#include <unistd.h>
@@ -18,7 +16,6 @@
#include <errno.h>
#include <stdarg.h>
#include <linux/types.h>
-#include <linux/falloc.h>
#include <blkid.h>
#include <libintl.h>
#include <locale.h>
diff --git a/gfs2/mkfs/main_jadd.c b/gfs2/mkfs/main_jadd.c
index 9190d44..739d964 100644
--- a/gfs2/mkfs/main_jadd.c
+++ b/gfs2/mkfs/main_jadd.c
@@ -9,7 +9,6 @@
#include <dirent.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
-#include <sys/file.h>
#include <sys/vfs.h>
#include <sys/mount.h>
#include <fcntl.h>
9 years, 1 month
gfs2-utils: master - gfs2-utils: Tidy up Makefile.am files
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=46ca47cf...
Commit: 46ca47cf35a03e1d9c57d89b67e84c25a8492a0e
Parent: d99e83f4f60c7e62df5ef6cea4fdc22c1e4bc074
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Sun Mar 29 07:41:14 2015 +0100
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Sun Mar 29 07:41:14 2015 +0100
gfs2-utils: Tidy up Makefile.am files
Reorganise the Makefile.am files for ease of maintenance.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
Makefile.am | 37 +++++++++++++++-----
doc/Makefile.am | 17 +++++----
gfs2/Makefile.am | 14 ++++++--
gfs2/convert/Makefile.am | 13 ++++---
gfs2/edit/Makefile.am | 34 +++++++++++++-----
gfs2/fsck/Makefile.am | 44 ++++++++++++++++++-------
gfs2/include/Makefile.am | 8 +++-
gfs2/libgfs2/Makefile.am | 83 +++++++++++++++++++++++++++++++--------------
gfs2/man/Makefile.am | 23 +++++++------
gfs2/mkfs/Makefile.am | 19 ++++++++--
gfs2/scripts/Makefile.am | 6 ++-
gfs2/tune/Makefile.am | 17 +++++----
tests/Makefile.am | 21 +++++++++--
13 files changed, 231 insertions(+), 105 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 963c060..1c4f8ae 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,18 +1,35 @@
-EXTRA_DIST = autogen.sh README.build
+EXTRA_DIST = autogen.sh README.build
-AUTOMAKE_OPTIONS = foreign
+AUTOMAKE_OPTIONS = foreign
-MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure depcomp \
- config.guess config.sub missing install-sh \
- autoheader automake autoconf libtool libtoolize \
- ltmain.sh compile make/clusterautoconfig.h.in \
- make/clusterautoconfig.h.in~
+MAINTAINERCLEANFILES = \
+ Makefile.in \
+ aclocal.m4 \
+ configure \
+ depcomp \
+ config.guess \
+ config.sub \
+ missing \
+ install-sh \
+ autoheader \
+ automake \
+ autoconf \
+ libtool \
+ libtoolize \
+ ltmain.sh \
+ compile \
+ make/clusterautoconfig.h.in \
+ make/clusterautoconfig.h.in~
-noinst_HEADERS = make/copyright.cf
+noinst_HEADERS = make/copyright.cf
-ACLOCAL_AMFLAGS = -I m4
+ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = po gfs2 doc tests
+SUBDIRS = \
+ po \
+ gfs2 \
+ doc \
+ tests
maintainer-clean-local:
rm -rf m4
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 32987b2..cf671d5 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,9 +1,10 @@
-MAINTAINERCLEANFILES = Makefile.in
+MAINTAINERCLEANFILES = Makefile.in
-dist_doc_DATA = gfs2.txt \
- journaling.txt \
- COPYING.applications \
- COPYING.libraries \
- COPYRIGHT \
- README.contributing \
- README.licence
+dist_doc_DATA = \
+ gfs2.txt \
+ journaling.txt \
+ COPYING.applications \
+ COPYING.libraries \
+ COPYRIGHT \
+ README.contributing \
+ README.licence
diff --git a/gfs2/Makefile.am b/gfs2/Makefile.am
index 645119f..028e840 100644
--- a/gfs2/Makefile.am
+++ b/gfs2/Makefile.am
@@ -1,4 +1,12 @@
-MAINTAINERCLEANFILES = Makefile.in
+MAINTAINERCLEANFILES = Makefile.in
-SUBDIRS = libgfs2 convert edit fsck mkfs man \
- tune include scripts #init.d
+SUBDIRS = \
+ include \
+ libgfs2 \
+ convert \
+ edit \
+ fsck \
+ mkfs \
+ man \
+ tune \
+ scripts
diff --git a/gfs2/convert/Makefile.am b/gfs2/convert/Makefile.am
index eb3c330..30924d7 100644
--- a/gfs2/convert/Makefile.am
+++ b/gfs2/convert/Makefile.am
@@ -1,9 +1,10 @@
-MAINTAINERCLEANFILES = Makefile.in
+MAINTAINERCLEANFILES = Makefile.in
-sbin_PROGRAMS = gfs2_convert
+sbin_PROGRAMS = gfs2_convert
-gfs2_convert_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -DHELPER_PROGRAM \
- -I$(top_srcdir)/gfs2/include \
- -I$(top_srcdir)/gfs2/libgfs2
+gfs2_convert_CPPFLAGS = \
+ -D_FILE_OFFSET_BITS=64 \
+ -I$(top_srcdir)/gfs2/include \
+ -I$(top_srcdir)/gfs2/libgfs2
-gfs2_convert_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la
+gfs2_convert_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la
diff --git a/gfs2/edit/Makefile.am b/gfs2/edit/Makefile.am
index 8b977ae..5d2942e 100644
--- a/gfs2/edit/Makefile.am
+++ b/gfs2/edit/Makefile.am
@@ -1,17 +1,31 @@
-MAINTAINERCLEANFILES = Makefile.in
+MAINTAINERCLEANFILES = Makefile.in
-sbin_PROGRAMS = gfs2_edit
+sbin_PROGRAMS = gfs2_edit
-noinst_HEADERS = gfs2hex.h hexedit.h extended.h journal.h
+noinst_HEADERS = \
+ gfs2hex.h \
+ hexedit.h \
+ extended.h \
+ journal.h
-gfs2_edit_SOURCES = gfs2hex.c hexedit.c savemeta.c extended.c journal.c
+gfs2_edit_SOURCES = \
+ gfs2hex.c \
+ hexedit.c \
+ savemeta.c \
+ extended.c \
+ journal.c
-gfs2_edit_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -DHELPER_PROGRAM \
- -I$(top_srcdir)/gfs2/include \
- -I$(top_srcdir)/gfs2/libgfs2
+gfs2_edit_CPPFLAGS = \
+ -D_FILE_OFFSET_BITS=64 \
+ -I$(top_srcdir)/gfs2/include \
+ -I$(top_srcdir)/gfs2/libgfs2
-gfs2_edit_CFLAGS = $(ncurses_CFLAGS) $(zlib_CFLAGS)
+gfs2_edit_CFLAGS = \
+ $(ncurses_CFLAGS) \
+ $(zlib_CFLAGS)
-gfs2_edit_LDFLAGS = $(ncurses_LIBS) $(zlib_LIBS)
+gfs2_edit_LDFLAGS = \
+ $(ncurses_LIBS) \
+ $(zlib_LIBS)
-gfs2_edit_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la
+gfs2_edit_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la
diff --git a/gfs2/fsck/Makefile.am b/gfs2/fsck/Makefile.am
index b34833b..fb93110 100644
--- a/gfs2/fsck/Makefile.am
+++ b/gfs2/fsck/Makefile.am
@@ -1,17 +1,37 @@
-MAINTAINERCLEANFILES = Makefile.in
+MAINTAINERCLEANFILES = Makefile.in
-sbin_PROGRAMS = fsck.gfs2
+sbin_PROGRAMS = fsck.gfs2
-noinst_HEADERS = fsck.h fs_recovery.h \
- inode_hash.h link.h lost_n_found.h metawalk.h util.h
+noinst_HEADERS = \
+ fsck.h \
+ fs_recovery.h \
+ inode_hash.h \
+ link.h \
+ lost_n_found.h \
+ metawalk.h \
+ util.h
-fsck_gfs2_SOURCES = fs_recovery.c initialize.c \
- inode_hash.c link.c lost_n_found.c main.c metawalk.c \
- pass1b.c pass1.c pass1c.c pass2.c pass3.c pass4.c \
- pass5.c rgrepair.c util.c
+fsck_gfs2_SOURCES = \
+ fs_recovery.c \
+ initialize.c \
+ inode_hash.c \
+ link.c \
+ lost_n_found.c \
+ main.c \
+ metawalk.c \
+ pass1b.c \
+ pass1.c \
+ pass1c.c \
+ pass2.c \
+ pass3.c \
+ pass4.c \
+ pass5.c \
+ rgrepair.c \
+ util.c
-fsck_gfs2_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -DHELPER_PROGRAM \
- -I$(top_srcdir)/gfs2/include \
- -I$(top_srcdir)/gfs2/libgfs2
+fsck_gfs2_CPPFLAGS = \
+ -D_FILE_OFFSET_BITS=64 \
+ -I$(top_srcdir)/gfs2/include \
+ -I$(top_srcdir)/gfs2/libgfs2
-fsck_gfs2_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la
+fsck_gfs2_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la
diff --git a/gfs2/include/Makefile.am b/gfs2/include/Makefile.am
index c755181..fca6f6a 100644
--- a/gfs2/include/Makefile.am
+++ b/gfs2/include/Makefile.am
@@ -1,3 +1,7 @@
-MAINTAINERCLEANFILES = Makefile.in
+MAINTAINERCLEANFILES = Makefile.in
-noinst_HEADERS = osi_list.h osi_tree.h linux_endian.h logging.h
+noinst_HEADERS = \
+ osi_list.h \
+ osi_tree.h \
+ linux_endian.h \
+ logging.h
diff --git a/gfs2/libgfs2/Makefile.am b/gfs2/libgfs2/Makefile.am
index 1ce8c13..2b7aa16 100644
--- a/gfs2/libgfs2/Makefile.am
+++ b/gfs2/libgfs2/Makefile.am
@@ -1,29 +1,60 @@
-MAINTAINERCLEANFILES = Makefile.in
-
-CLEANFILES = parser.h parser.c lexer.c lexer.h
-BUILT_SOURCES = parser.h lexer.h
-AM_LFLAGS = --header-file=lexer.h
-AM_YFLAGS = -d
-
-noinst_HEADERS = libgfs2.h lang.h config.h rgrp.h
-
-noinst_LTLIBRARIES = libgfs2.la
-
-noinst_PROGRAMS = gfs2l
-
-libgfs2_la_SOURCES = block_list.c fs_bits.c gfs1.c misc.c rgrp.c super.c \
- buf.c fs_geometry.c gfs2_disk_hash.c ondisk.c config.c \
- device_geometry.c fs_ops.c recovery.c \
- structures.c meta.c lang.c parser.y lexer.l
-
-libgfs2_la_CPPFLAGS = -D_FILE_OFFSET_BITS=64 \
- -D_LARGEFILE64_SOURCE \
- -D_GNU_SOURCE \
- -I$(top_srcdir)/gfs2/include
-
-gfs2l_SOURCES = gfs2l.c
-gfs2l_CPPFLAGS = -I$(top_srcdir)/gfs2/include -D_FILE_OFFSET_BITS=64
-gfs2l_LDADD = libgfs2.la
+MAINTAINERCLEANFILES = Makefile.in
+
+CLEANFILES = \
+ parser.h \
+ parser.c \
+ lexer.c \
+ lexer.h
+
+BUILT_SOURCES = \
+ parser.h \
+ lexer.h
+
+AM_LFLAGS = --header-file=lexer.h
+AM_YFLAGS = -d
+
+noinst_HEADERS = \
+ libgfs2.h \
+ lang.h \
+ config.h \
+ rgrp.h
+
+noinst_LTLIBRARIES = libgfs2.la
+
+noinst_PROGRAMS = gfs2l
+
+libgfs2_la_SOURCES = \
+ block_list.c \
+ fs_bits.c \
+ gfs1.c \
+ misc.c \
+ rgrp.c \
+ super.c \
+ buf.c \
+ fs_geometry.c \
+ gfs2_disk_hash.c \
+ ondisk.c \
+ config.c \
+ device_geometry.c \
+ fs_ops.c \
+ recovery.c \
+ structures.c \
+ meta.c \
+ lang.c \
+ parser.y \
+ lexer.l
+
+libgfs2_la_CPPFLAGS = \
+ -D_FILE_OFFSET_BITS=64 \
+ -D_LARGEFILE64_SOURCE \
+ -D_GNU_SOURCE \
+ -I$(top_srcdir)/gfs2/include
+
+gfs2l_SOURCES = gfs2l.c
+gfs2l_LDADD = libgfs2.la
+gfs2l_CPPFLAGS = \
+ -I$(top_srcdir)/gfs2/include \
+ -D_FILE_OFFSET_BITS=64
# Autotools can't handle header files output by flex so we have to generate it manually
lexer.h: lexer.l
diff --git a/gfs2/man/Makefile.am b/gfs2/man/Makefile.am
index 82eab9a..d73f1ed 100644
--- a/gfs2/man/Makefile.am
+++ b/gfs2/man/Makefile.am
@@ -1,12 +1,13 @@
-MAINTAINERCLEANFILES = Makefile.in
+MAINTAINERCLEANFILES = Makefile.in
-dist_man_MANS = fsck.gfs2.8 \
- gfs2.5 \
- gfs2_convert.8 \
- gfs2_edit.8 \
- gfs2_grow.8 \
- gfs2_jadd.8 \
- mkfs.gfs2.8 \
- tunegfs2.8 \
- gfs2_lockcapture.8 \
- gfs2_trace.8
+dist_man_MANS = \
+ fsck.gfs2.8 \
+ gfs2.5 \
+ gfs2_convert.8 \
+ gfs2_edit.8 \
+ gfs2_grow.8 \
+ gfs2_jadd.8 \
+ mkfs.gfs2.8 \
+ tunegfs2.8 \
+ gfs2_lockcapture.8 \
+ gfs2_trace.8
diff --git a/gfs2/mkfs/Makefile.am b/gfs2/mkfs/Makefile.am
index 475f1a8..6c49d3b 100644
--- a/gfs2/mkfs/Makefile.am
+++ b/gfs2/mkfs/Makefile.am
@@ -7,9 +7,14 @@ COMMON_CPPFLAGS = \
-I$(top_srcdir)/gfs2/include \
-I$(top_srcdir)/gfs2/libgfs2
-sbin_PROGRAMS = mkfs.gfs2 gfs2_jadd gfs2_grow
+sbin_PROGRAMS = \
+ mkfs.gfs2 \
+ gfs2_jadd \
+ gfs2_grow
-noinst_HEADERS = gfs2_mkfs.h metafs.h
+noinst_HEADERS = \
+ gfs2_mkfs.h \
+ metafs.h
mkfs_gfs2_SOURCES = main_mkfs.c
mkfs_gfs2_CPPFLAGS = $(COMMON_CPPFLAGS)
@@ -17,13 +22,19 @@ mkfs_gfs2_CFLAGS = $(blkid_CFLAGS)
mkfs_gfs2_LDFLAGS = $(blkid_LIBS)
mkfs_gfs2_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la
-gfs2_grow_SOURCES = main_grow.c metafs.c
+gfs2_grow_SOURCES = \
+ main_grow.c \
+ metafs.c
+
gfs2_grow_CPPFLAGS = $(COMMON_CPPFLAGS)
gfs2_grow_CFLAGS = $(blkid_CFLAGS)
gfs2_grow_LDFLAGS = $(blkid_LIBS)
gfs2_grow_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la
-gfs2_jadd_SOURCES = main_jadd.c metafs.c
+gfs2_jadd_SOURCES = \
+ main_jadd.c \
+ metafs.c
+
gfs2_jadd_CPPFLAGS = $(COMMON_CPPFLAGS)
gfs2_jadd_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la
diff --git a/gfs2/scripts/Makefile.am b/gfs2/scripts/Makefile.am
index 1c98f95..62fb2fe 100644
--- a/gfs2/scripts/Makefile.am
+++ b/gfs2/scripts/Makefile.am
@@ -1,3 +1,5 @@
-MAINTAINERCLEANFILES = Makefile.in
+MAINTAINERCLEANFILES = Makefile.in
-dist_sbin_SCRIPTS = gfs2_lockcapture gfs2_trace
+dist_sbin_SCRIPTS = \
+ gfs2_lockcapture \
+ gfs2_trace
diff --git a/gfs2/tune/Makefile.am b/gfs2/tune/Makefile.am
index 41371bc..c060183 100644
--- a/gfs2/tune/Makefile.am
+++ b/gfs2/tune/Makefile.am
@@ -1,11 +1,14 @@
-MAINTAINERCLEANFILES = Makefile.in
+MAINTAINERCLEANFILES = Makefile.in
-sbin_PROGRAMS = tunegfs2
+sbin_PROGRAMS = tunegfs2
-noinst_HEADERS = tunegfs2.h
+noinst_HEADERS = tunegfs2.h
-tunegfs2_SOURCES = main.c super.c
+tunegfs2_SOURCES = \
+ main.c \
+ super.c
-tunegfs2_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -DHELPER_PROGRAM \
- -I$(top_srcdir)/gfs2/include \
- -I$(top_srcdir)/group/include
+tunegfs2_CPPFLAGS = \
+ -D_FILE_OFFSET_BITS=64 \
+ -I$(top_srcdir)/gfs2/include \
+ -I$(top_srcdir)/group/include
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3abb640..5a37319 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,5 +1,14 @@
-EXTRA_DIST = $(TESTSUITE_AT) package.m4 $(TESTSUITE) atlocal atconfig
-DISTCLEANFILES = atlocal atconfig
+EXTRA_DIST = \
+ $(TESTSUITE_AT) \
+ $(TESTSUITE) \
+ package.m4 \
+ atlocal \
+ atconfig
+
+DISTCLEANFILES = \
+ atlocal \
+ atconfig
+
CLEANFILES = testvol
if HAVE_CHECK
@@ -22,12 +31,16 @@ UNIT_CPPFLAGS = \
check_PROGRAMS = $(UNIT_TESTS)
-check_meta_SOURCES = $(UNIT_SOURCES) check_meta.c
+check_meta_SOURCES = \
+ $(UNIT_SOURCES) \
+ check_meta.c
check_meta_CFLAGS = $(UNIT_CFLAGS)
check_meta_LDADD = $(UNIT_LDADD)
check_meta_CPPFLAGS = $(UNIT_CPPFLAGS)
-check_rgrp_SOURCES = $(UNIT_SOURCES) check_rgrp.c
+check_rgrp_SOURCES = \
+ $(UNIT_SOURCES) \
+ check_rgrp.c
check_rgrp_CFLAGS = $(UNIT_CFLAGS)
check_rgrp_LDADD = $(UNIT_LDADD)
check_rgrp_CPPFLAGS = $(UNIT_CPPFLAGS)
9 years, 1 month
gfs2-utils: master - libgfs2: Remove some unused data structures
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=d99e83f4...
Commit: d99e83f4f60c7e62df5ef6cea4fdc22c1e4bc074
Parent: d1a8817f0d72e6bd2a03f618daab4af006dfb791
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Thu Jan 15 19:09:26 2015 +0000
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Sun Mar 29 02:27:33 2015 +0100
libgfs2: Remove some unused data structures
struct per_node and some fields of struct master_dir are not being used
at all, remove them.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/libgfs2/libgfs2.h | 21 +--------------------
1 files changed, 1 insertions(+), 20 deletions(-)
diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
index 374d774..f1f81d3 100644
--- a/gfs2/libgfs2/libgfs2.h
+++ b/gfs2/libgfs2/libgfs2.h
@@ -236,39 +236,20 @@ struct gfs2_inode {
struct rgrp_tree *i_rgd; /* The rgrp this inode is in */
};
-/* FIXME not sure that i want to keep a record of the inodes or the
- * contents of them, or both ... if I need to write back to them, it
- * would be easier to hold the inode as well */
-struct per_node
-{
- struct gfs2_inode *inum;
- struct gfs2_inum_range inum_range;
- struct gfs2_inode *statfs;
- struct gfs2_statfs_change statfs_change;
- struct gfs2_inode *unlinked;
- struct gfs2_inode *quota;
- struct gfs2_quota_change quota_change;
-};
-
struct master_dir
{
struct gfs2_inode *inum;
uint64_t next_inum;
struct gfs2_inode *statfs;
- struct gfs2_statfs_change statfs_change;
-
- struct gfs2_rindex rindex;
struct gfs2_inode *qinode;
- struct gfs2_quota quotas;
struct gfs2_inode *jiinode;
struct gfs2_inode *riinode;
struct gfs2_inode *rooti;
struct gfs2_inode *pinode;
-
+
struct gfs2_inode **journal; /* Array of journals */
uint32_t journals; /* Journal count */
- struct per_node *pn; /* Array of per_node entries */
};
struct gfs2_sbd {
9 years, 1 month