Compare commits

...
Sign in to create a new pull request.

40 commits

Author SHA1 Message Date
Andrew Price
1cd5e80544 Migrate tests to tmt
For https://fedoraproject.org/wiki/Changes/DisableSTI
2025-07-28 13:08:50 +00:00
Fedora Release Engineering
940e138031 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-23 21:20:59 +00:00
Andrew Price
0d360ede59 * Thu Feb 27 2025 Andrew Price <anprice@redhat.com> - 3.6.1-1
- New upstream release
2025-02-27 17:14:20 +00:00
Andrew Price
9914a4c60a * Mon Jan 20 2025 Andrew Price <anprice@redhat.com> - 3.5.1-7
- Don't hardcode /usr/sbin in the spec
2025-01-20 18:06:53 +00:00
Fedora Release Engineering
11929a3761 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-16 19:57:40 +00:00
Fedora Release Engineering
5a9f1acadd Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-18 00:35:26 +00:00
Fedora Release Engineering
e87fb43e6f Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-24 12:56:36 +00:00
Fedora Release Engineering
2a63457c45 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-19 20:41:10 +00:00
Fedora Release Engineering
8a2056d72b Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-19 21:13:19 +00:00
Andrew Price
c378aa91c6 * Tue Apr 11 2023 Andrew Price <anprice@redhat.com> - 3.5.1-1
- New upstream release
2023-04-11 18:37:03 +01:00
Andrew Price
1e1999af85 * Thu Feb 09 2023 Andrew Price <anprice@redhat.com> - 3.5.0-1
- New upstream release
- Drop all patches
- Exclude i686 for https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
- Migrate to SPDX license identifier
2023-02-09 16:32:20 +00:00
Fedora Release Engineering
5af69c86ff Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 04:47:19 +00:00
Fedora Release Engineering
05ff9d3929 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-21 04:32:13 +00:00
Andrew Price
56e8974ead * Thu Jun 23 2022 Andrew Price <anprice@redhat.com> - 3.4.1-4
- gfs2/edit: always use "%s"-style format for printf()-style functions
- Custom patch to fix a printw() call missed by the above
  Fixes a build failure due to format-security warnings being treated as errors
2022-06-23 15:41:47 +01:00
Fedora Release Engineering
009a3940f3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 04:21:55 +00:00
Fedora Release Engineering
c1bedfabfa - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-22 00:10:11 +00:00
Andrew Price
a074a7436d * Mon Mar 15 2021 Andrew Price <anprice@redhat.com> - 3.4.1-1
- New upstream version
2021-03-15 10:41:35 +00:00
Andrew Price
f0844f3308 * Mon Mar 08 2021 Andrew Price <anprice@redhat.com> - 3.4.0-1
- New upstream version
- Update testsuite script
2021-03-08 16:33:08 +00:00
Fedora Release Engineering
ee35a59aa6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 06:43:58 +00:00
Tom Stellard
bcaa73a827 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2020-12-18 23:16:45 +00:00
Andrew Price
01606e25fc Add gating tests 2020-09-03 09:19:32 +01:00
Andrew Price
9791e7be60 * Tue Sep 01 2020 Andrew Price <anprice@redhat.com> - 3.3.0-1
- New upstream version
- Add dependency on bzip2
- Drop all patches
- gfs2_withdraw_helper is now in /usr/libexec/
2020-09-01 17:36:02 +01:00
Andrew Price
a65087a00f * Wed Jul 29 2020 Andrew Price <anprice@redhat.com> - 3.2.0-10
- tests: Don't use fail_unless in unit tests
  Fixes build failures due to a regression in check-devel
2020-07-29 13:55:47 +01:00
Fedora Release Engineering
061d248773 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-27 18:40:16 +00:00
Andrew Price
467059d2ea * Tue Jul 21 2020 Andrew Price <anprice@redhat.com> - 3.2.0-8
- Use make_build and make_install macros
  https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
- Remove -C gfs2 - it's a remnant from the cluster.git days
- Remove unnecessary header notice from spec file
2020-07-21 09:18:02 +01:00
Fedora Release Engineering
11c4e7ef47 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-28 20:06:42 +00:00
Fedora Release Engineering
b2747aceae - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-25 01:57:33 +00:00
Andrew Price
a72c2fad78 * Mon Feb 04 2019 Andrew Price <anprice@redhat.com> - 3.2.0-5
- Fix libuuid linking
2019-02-04 15:40:42 +00:00
Fedora Release Engineering
a04af2238d - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-01-31 21:02:12 +00:00
Igor Gnatenko
0d73d64ad4 Remove obsolete Group tag
References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
2019-01-28 20:24:03 +01:00
Fedora Release Engineering
6eafa31975 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-13 01:27:50 +00:00
Andrew Price
6120ebbdbf * Thu Jun 21 2018 Andrew Price <anprice@redhat.com> - 3.2.0-2
- Recommend the gfs2 and dlm kmods instead of requiring them
  Resolves: bz#1593411
2018-06-21 10:43:18 +01:00
Andrew Price
e35859f0ef * Thu May 24 2018 Andrew Price <anprice@redhat.com> - 3.2.0-1
- New upstream release
2018-05-24 12:52:33 +01:00
Fedora Release Engineering
08330317c4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-07 11:09:41 +00:00
Andrew Price
d1928c796c * Fri Oct 13 2017 Andrew Price <anprice@redhat.com> - 3.1.10-4
- Update URL in spec file
2017-10-13 11:49:12 +01:00
Fedora Release Engineering
83a09d5373 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-02 21:08:14 +00:00
Fedora Release Engineering
c3751bb143 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-26 09:29:41 +00:00
Andrew Price
5447989ec9 * Tue Mar 28 2017 Andrew Price <anprice@redhat.com> - 3.1.10-1
- New upstream release
- Make dependency on libuuid explicit
2017-03-28 18:24:18 +01:00
Fedora Release Engineering
a9525bd22d - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-10 10:29:44 +00:00
Andrew Price
4593ae723d * Tue Jun 07 2016 Andrew Price <anprice@redhat.com> - 3.1.9-1
- New upstream release
- Drop all patches
- Add glocktop to the package
2016-06-07 13:23:02 +01:00
20 changed files with 5839 additions and 1164 deletions

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

15
.gitignore vendored
View file

@ -1,9 +1,6 @@
/gfs2-utils-3.1.0.tar.gz
/gfs2-utils-3.1.1.tar.gz
/gfs2-utils-3.1.2.tar.gz
/gfs2-utils-3.1.3.tar.gz
/gfs2-utils-3.1.4.tar.gz
/gfs2-utils-3.1.5.tar.gz
/gfs2-utils-3.1.6.tar.gz
/gfs2-utils-3.1.7.tar.gz
/gfs2-utils-3.1.8.tar.gz
/gfs2-utils-3.3.0.tar.gz
/gfs2-utils-3.4.0.tar.gz
/gfs2-utils-3.4.1.tar.gz
/gfs2-utils-3.5.0.tar.gz
/gfs2-utils-3.5.1.tar.gz
/gfs2-utils-3.6.1.tar.gz

View file

@ -1,43 +0,0 @@
commit 3141e81ae6eef9c2fa1de36929140ec122c70805
Author: Andreas Gruenbacher <andreas.gruenbacher@gmail.com>
Date: Wed Sep 9 17:55:29 2015 +0200
libgfs2: Add support for dirent.de_rahead
This field indicates how many blocks of metadata can be read ahead when reading
in the inode a directory entry points at.
Signed-off-by: Andreas Gruenbacher <andreas.gruenbacher@gmail.com>
diff --git a/gfs2/libgfs2/meta.c b/gfs2/libgfs2/meta.c
index 79de64d..70daec4 100644
--- a/gfs2/libgfs2/meta.c
+++ b/gfs2/libgfs2/meta.c
@@ -428,6 +428,7 @@ 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)
+F(de_rahead)
RF(__pad)
};
diff --git a/gfs2/libgfs2/ondisk.c b/gfs2/libgfs2/ondisk.c
index 4744337..7f34bd2 100644
--- a/gfs2/libgfs2/ondisk.c
+++ b/gfs2/libgfs2/ondisk.c
@@ -415,6 +415,7 @@ 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);
+ CPIN_16(de, str, de_rahead);
}
void gfs2_dirent_out(struct gfs2_dirent *de, char *buf)
@@ -427,6 +428,7 @@ void gfs2_dirent_out(struct gfs2_dirent *de, char *buf)
CPOUT_16(de, str, de_name_len);
CPOUT_16(de, str, de_type);
memset(str->__pad, 0, sizeof(str->__pad));
+ CPOUT_16(de, str, de_rahead);
}
void gfs2_leaf_in(struct gfs2_leaf *lf, struct gfs2_buffer_head *bh)

View file

@ -1,32 +0,0 @@
commit dcd8296e142d3bd69e1a1bda2c096ed78fe4888f
Author: Andreas Gruenbacher <andreas.gruenbacher@gmail.com>
Date: Wed Sep 9 17:55:30 2015 +0200
gfs2_edit: Include dirent.de_rahead in directory listings
When dumping a directory, for directory each entry, also print how many blocks
of metadata can be read ahead when reading in the inode the entry points at.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
diff --git a/gfs2/edit/extended.c b/gfs2/edit/extended.c
index e5cb12c..b1826a1 100644
--- a/gfs2/edit/extended.c
+++ b/gfs2/edit/extended.c
@@ -342,13 +342,14 @@ static int display_leaf(struct iinfo *ind)
strcpy(edit_fmt, "%llx");
}
}
- print_gfs2("%d/%d [%08x] %lld/%lld (0x%llx/0x%llx): ",
+ print_gfs2("%d/%d [%08x] %lld/%lld (0x%llx/0x%llx) +%u: ",
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);
+ ind->ii[0].dirent[d].block,
+ (unsigned int)ind->ii[0].dirent[d].dirent.de_rahead);
}
print_inode_type(ind->ii[0].dirent[d].dirent.de_type);
print_gfs2(" %s", ind->ii[0].dirent[d].filename);

View file

@ -1,83 +0,0 @@
commit 471bc208c8e29013b2abb66f36d6e6d9ef4e4337
Author: Andrew Price <anprice@redhat.com>
Date: Thu Sep 10 11:33:24 2015 +0100
gfs2-utils: Add a check for the de_rahead field
gfs2_dirent.de_rahead first appeared in Linux 3.15. Support prior
versions by checking for de_rahead and using it conditionally.
Signed-off-by: Andrew Price <anprice@redhat.com>
diff --git a/configure.ac b/configure.ac
index 35cafe6..a5418aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -125,6 +125,8 @@ AC_CHECK_HEADER([linux/gfs2_ondisk.h], [], [AC_MSG_ERROR([Unable to find linux/g
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>]])
+AC_CHECK_MEMBER([struct gfs2_dirent.de_rahead],[AC_DEFINE([GFS2_HAS_DE_RAHEAD],[],[Dirent readahead field])],
+ [], [[#include <linux/gfs2_ondisk.h>]])
# *FLAGS handling
ENV_CFLAGS="$CFLAGS"
diff --git a/gfs2/edit/extended.c b/gfs2/edit/extended.c
index b1826a1..a13827e 100644
--- a/gfs2/edit/extended.c
+++ b/gfs2/edit/extended.c
@@ -349,7 +349,12 @@ static int display_leaf(struct iinfo *ind)
ind->ii[0].dirent[d].block,
ind->ii[0].dirent[d].dirent.de_inum.no_formal_ino,
ind->ii[0].dirent[d].block,
- (unsigned int)ind->ii[0].dirent[d].dirent.de_rahead);
+#ifdef GFS2_HAS_DE_RAHEAD
+ (unsigned int)ind->ii[0].dirent[d].dirent.de_rahead
+#else
+ 0
+#endif
+ );
}
print_inode_type(ind->ii[0].dirent[d].dirent.de_type);
print_gfs2(" %s", ind->ii[0].dirent[d].filename);
diff --git a/gfs2/libgfs2/meta.c b/gfs2/libgfs2/meta.c
index 70daec4..4f43af5 100644
--- a/gfs2/libgfs2/meta.c
+++ b/gfs2/libgfs2/meta.c
@@ -428,8 +428,12 @@ 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)
+RF(__pad2)
+#else
RF(__pad)
+#endif
};
#undef STRUCT
diff --git a/gfs2/libgfs2/ondisk.c b/gfs2/libgfs2/ondisk.c
index 7f34bd2..b9418c5 100644
--- a/gfs2/libgfs2/ondisk.c
+++ b/gfs2/libgfs2/ondisk.c
@@ -415,7 +415,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);
+#endif
}
void gfs2_dirent_out(struct gfs2_dirent *de, char *buf)
@@ -428,7 +430,9 @@ void gfs2_dirent_out(struct gfs2_dirent *de, char *buf)
CPOUT_16(de, str, de_name_len);
CPOUT_16(de, str, de_type);
memset(str->__pad, 0, sizeof(str->__pad));
+#ifdef GFS2_HAS_DE_RAHEAD
CPOUT_16(de, str, de_rahead);
+#endif
}
void gfs2_leaf_in(struct gfs2_leaf *lf, struct gfs2_buffer_head *bh)

View file

@ -1,106 +0,0 @@
commit da2bced4ff2a8fa9c95fde8071f2f164c0c1466a
Author: Andrew Price <anprice@redhat.com>
Date: Mon Feb 15 12:42:51 2016 +0000
libgfs2: Support the new dirent de_cookie field
Detect whether the new de_cookie field (kernel commit 471f3db27) is
present in struct gfs2_dirent in the configure script and update the
metadata description to support that field.
It also seems that meta.c was not using the GFS2_HAS_* defines from
clusterautoconfig.h and that was causing a unit test to fail with
gfs2_dirent: __pad: offset is 28, expected 26
gfs2_dirent: size mismatch between struct 40 and fields 38
This commit adds an #include to fix that.
Fixes Rawhide bz#1307532
Signed-off-by: Andrew Price <anprice@redhat.com>
diff --git a/configure.ac b/configure.ac
index 130cb01..f6174ff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -127,6 +127,8 @@ AC_CHECK_MEMBER([struct gfs2_leaf.lf_inode],[AC_DEFINE([GFS2_HAS_LEAF_HINTS],[],
[], [[#include <linux/gfs2_ondisk.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>]])
# *FLAGS handling
ENV_CFLAGS="$CFLAGS"
diff --git a/gfs2/libgfs2/meta.c b/gfs2/libgfs2/meta.c
index 4f43af5..90d5647 100644
--- a/gfs2/libgfs2/meta.c
+++ b/gfs2/libgfs2/meta.c
@@ -1,6 +1,7 @@
#include <stdint.h>
#include <string.h>
#include "libgfs2.h"
+#include "clusterautoconfig.h"
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
#define SYM(x) { x, #x },
@@ -430,10 +431,15 @@ F(de_name_len, .flags = LGFS2_MFF_BYTES)
F(de_type)
#ifdef GFS2_HAS_DE_RAHEAD
F(de_rahead)
-RF(__pad2)
+#ifdef GFS2_HAS_DE_COOKIE
+F(de_cookie)
+RF(pad3)
+#else
+RF(pad2)
+#endif /* GFS2_HAS_DE_COOKIE */
#else
RF(__pad)
-#endif
+#endif /* GFS2_HAS_DE_RAHEAD */
};
#undef STRUCT
diff --git a/gfs2/libgfs2/ondisk.c b/gfs2/libgfs2/ondisk.c
index b9418c5..ea1f61f 100644
--- a/gfs2/libgfs2/ondisk.c
+++ b/gfs2/libgfs2/ondisk.c
@@ -417,7 +417,15 @@ void gfs2_dirent_in(struct gfs2_dirent *de, char *buf)
CPIN_16(de, str, de_type);
#ifdef GFS2_HAS_DE_RAHEAD
CPIN_16(de, str, de_rahead);
-#endif
+#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)
@@ -429,10 +437,17 @@ 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);
- memset(str->__pad, 0, sizeof(str->__pad));
#ifdef GFS2_HAS_DE_RAHEAD
CPOUT_16(de, str, de_rahead);
-#endif
+#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, struct gfs2_buffer_head *bh)

View file

@ -1,304 +0,0 @@
commit f1028ec054f2d7f85a449b2bf0894e0435c01d6a
Author: Abhi Das <adas@redhat.com>
Date: Tue Apr 14 19:51:55 2015 -0500
fsck.gfs2: replace recent i_goal fixes with simple logic
This patch reverses the recent set of i_goal fixes for fsck.gfs2.
This is because of two problems.
1. It is not possible to determine if a valid block within the fs
is the correct goal block for a given inode.
2. Conversely, given an inode, it is also not possible to accurately
determine what its goal block should be.
The previous patches assumed that the last block of a file is its
goal block, but that is not true if the file is a directory or if
its blocks are not allocated sequentially. fsck.gfs2 would flag
these inodes incorrectly as having bad i_goal values.
This patch takes a simple approach. It checks if the i_goal of a
given inode is out of bounds of the fs. If so, we can be certain
that it is wrong and we set it to the inode metadata block. This
is a safe starting point for gfs2 to determine where to allocate
from next.
Resolves: rhbz#1186515
Signed-off-by: Abhi Das <adas@redhat.com>
diff --git a/gfs2/fsck/metawalk.c b/gfs2/fsck/metawalk.c
index f05fb51..4d5a660 100644
--- a/gfs2/fsck/metawalk.c
+++ b/gfs2/fsck/metawalk.c
@@ -1428,8 +1428,7 @@ static int build_and_check_metalist(struct gfs2_inode *ip, osi_list_t *mlp,
*/
static int check_data(struct gfs2_inode *ip, struct metawalk_fxns *pass,
struct gfs2_buffer_head *bh, int head_size,
- uint64_t *last_block, uint64_t *blks_checked,
- uint64_t *error_blk)
+ uint64_t *blks_checked, uint64_t *error_blk)
{
int error = 0, rc = 0;
uint64_t block, *ptr;
@@ -1444,7 +1443,7 @@ static int check_data(struct gfs2_inode *ip, struct metawalk_fxns *pass,
if (skip_this_pass || fsck_abort)
return error;
- *last_block = block = be64_to_cpu(*ptr);
+ block = be64_to_cpu(*ptr);
/* It's important that we don't call valid_block() and
bypass calling check_data on invalid blocks because that
would defeat the rangecheck_block related functions in
@@ -1548,15 +1547,12 @@ int check_metatree(struct gfs2_inode *ip, struct metawalk_fxns *pass)
struct gfs2_buffer_head *bh;
uint32_t height = ip->i_di.di_height;
int i, head_size;
- uint64_t blks_checked = 0, last_block = 0;
+ uint64_t blks_checked = 0;
int error, rc;
int metadata_clean = 0;
uint64_t error_blk = 0;
int hit_error_blk = 0;
- if (!height && pass->check_i_goal)
- pass->check_i_goal(ip, ip->i_di.di_num.no_addr,
- pass->private);
if (!height && !is_dir(&ip->i_di, ip->i_sbd->gfs1))
return 0;
@@ -1575,9 +1571,6 @@ int check_metatree(struct gfs2_inode *ip, struct metawalk_fxns *pass)
* comprise the directory hash table, so we perform the directory
* checks and exit. */
if (is_dir(&ip->i_di, ip->i_sbd->gfs1)) {
- last_block = ip->i_di.di_num.no_addr;
- if (pass->check_i_goal)
- pass->check_i_goal(ip, last_block, pass->private);
if (!(ip->i_di.di_flags & GFS2_DIF_EXHASH))
goto out;
/* check validity of leaf blocks and leaf chains */
@@ -1604,7 +1597,7 @@ int check_metatree(struct gfs2_inode *ip, struct metawalk_fxns *pass)
if (pass->check_data)
error = check_data(ip, pass, bh, head_size,
- &last_block, &blks_checked, &error_blk);
+ &blks_checked, &error_blk);
if (pass->big_file_msg && ip->i_di.di_blocks > COMFORTABLE_BLKS)
pass->big_file_msg(ip, blks_checked);
}
@@ -1616,8 +1609,6 @@ int check_metatree(struct gfs2_inode *ip, struct metawalk_fxns *pass)
(unsigned long long)ip->i_di.di_num.no_addr);
fflush(stdout);
}
- if (!error && pass->check_i_goal)
- pass->check_i_goal(ip, last_block, pass->private);
undo_metalist:
if (!error)
goto out;
@@ -1958,80 +1949,6 @@ static int alloc_leaf(struct gfs2_inode *ip, uint64_t block, void *private)
return 0;
}
-/**
- * rgrp_contains_block - Check if the rgrp provided contains the
- * given block. Taken directly from the gfs2 kernel code
- * @rgd: The rgrp to search within
- * @block: The block to search for
- *
- * Returns: 1 if present, 0 if not.
- */
-static inline int rgrp_contains_block(struct rgrp_tree *rgd, uint64_t block)
-{
- uint64_t first = rgd->ri.ri_data0;
- uint64_t last = first + rgd->ri.ri_data;
- return first <= block && block < last;
-}
-
-/**
- * check_i_goal
- * @ip
- * @goal_blk: What the goal block should be for this inode
- *
- * The goal block for a regular file is typically the last
- * data block of the file. If we can't get the right value,
- * the inode metadata block is the next best thing.
- *
- * Returns: 0 if corrected, 1 if not corrected
- */
-int check_i_goal(struct gfs2_inode *ip, uint64_t goal_blk,
- void *private)
-{
- struct gfs2_sbd *sdp = ip->i_sbd;
- uint64_t i_block = ip->i_di.di_num.no_addr;
-
- /* Don't fix gfs1 inodes, system inodes or inodes whose goal blocks are
- * set to the inode blocks themselves. */
- 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;
-
- if (ip->i_di.di_goal_meta != goal_blk) {
- /* If the existing goal block is in the same rgrp as the inode,
- * we give the benefit of doubt and assume the value is correct */
- if (ip->i_rgd &&
- rgrp_contains_block(ip->i_rgd, ip->i_di.di_goal_meta))
- goto skip;
- log_err( _("Error: inode %llu (0x%llx) has invalid "
- "allocation goal block %llu (0x%llx). Should"
- " be %llu (0x%llx)\n"),
- (unsigned long long)i_block, (unsigned long long)i_block,
- (unsigned long long)ip->i_di.di_goal_meta,
- (unsigned long long)ip->i_di.di_goal_meta,
- (unsigned long long)goal_blk, (unsigned long long)goal_blk);
- if (query( _("Fix the invalid goal block? (y/n) "))) {
- ip->i_di.di_goal_meta = ip->i_di.di_goal_data = goal_blk;
- bmodified(ip->i_bh);
- } else {
- log_err(_("Invalid goal block not fixed.\n"));
- return 1;
- }
- }
-skip:
- return 0;
-}
-
struct metawalk_fxns alloc_fxns = {
.private = NULL,
.check_leaf = alloc_leaf,
@@ -2042,7 +1959,6 @@ struct metawalk_fxns alloc_fxns = {
.check_dentry = NULL,
.check_eattr_entry = NULL,
.check_eattr_extentry = NULL,
- .check_i_goal = check_i_goal,
.finish_eattr_indir = NULL,
};
diff --git a/gfs2/fsck/metawalk.h b/gfs2/fsck/metawalk.h
index 779360e..fa4c850 100644
--- a/gfs2/fsck/metawalk.h
+++ b/gfs2/fsck/metawalk.h
@@ -50,8 +50,6 @@ extern int _fsck_blockmap_set(struct gfs2_inode *ip, uint64_t bblock,
const char *caller, int line);
extern int check_n_fix_bitmap(struct gfs2_sbd *sdp, uint64_t blk,
int error_on_dinode, int new_blockmap_state);
-extern int check_i_goal(struct gfs2_inode *ip, uint64_t goal_blk,
- void *private);
extern void reprocess_inode(struct gfs2_inode *ip, const char *desc);
extern struct duptree *dupfind(uint64_t block);
extern struct gfs2_inode *fsck_system_inode(struct gfs2_sbd *sdp,
@@ -91,7 +89,6 @@ enum meta_check_rc {
* check_dentry:
* check_eattr_entry:
* check_eattr_extentry:
- * check_i_goal:
*/
struct metawalk_fxns {
void *private;
@@ -143,8 +140,6 @@ struct metawalk_fxns {
struct gfs2_ea_header *ea_hdr,
struct gfs2_ea_header *ea_hdr_prev,
void *private);
- int (*check_i_goal) (struct gfs2_inode *ip, uint64_t goal_blk,
- void *private);
int (*finish_eattr_indir) (struct gfs2_inode *ip, int leaf_pointers,
int leaf_pointer_errors, void *private);
void (*big_file_msg) (struct gfs2_inode *ip, uint64_t blks_checked);
diff --git a/gfs2/fsck/pass1.c b/gfs2/fsck/pass1.c
index 69c88f4..0909873 100644
--- a/gfs2/fsck/pass1.c
+++ b/gfs2/fsck/pass1.c
@@ -100,7 +100,6 @@ struct metawalk_fxns pass1_fxns = {
.check_dentry = NULL,
.check_eattr_entry = check_eattr_entries,
.check_eattr_extentry = check_extended_leaf_eattr,
- .check_i_goal = check_i_goal,
.finish_eattr_indir = finish_eattr_indir,
.big_file_msg = big_file_comfort,
.repair_leaf = pass1_repair_leaf,
@@ -1205,12 +1204,37 @@ bad_dinode:
return -1;
}
+static void check_i_goal(struct gfs2_sbd *sdp, struct gfs2_inode *ip)
+{
+ if (sdp->gfs1 || ip->i_di.di_flags & GFS2_DIF_SYSTEM)
+ return;
+
+ if (ip->i_di.di_goal_meta <= sdp->sb_addr ||
+ ip->i_di.di_goal_meta > sdp->fssize) {
+ log_err(_("Inode #%llu (0x%llx): Bad allocation goal block "
+ "found: %llu (0x%llx)\n"),
+ (unsigned long long)ip->i_di.di_num.no_addr,
+ (unsigned long long)ip->i_di.di_num.no_addr,
+ (unsigned long long)ip->i_di.di_goal_meta,
+ (unsigned long long)ip->i_di.di_goal_meta);
+ if (query( _("Fix goal block in inode #%llu (0x%llx)? (y/n) "),
+ (unsigned long long)ip->i_di.di_num.no_addr,
+ (unsigned long long)ip->i_di.di_num.no_addr)) {
+ ip->i_di.di_goal_meta = ip->i_di.di_num.no_addr;
+ bmodified(ip->i_bh);
+ } else
+ log_err(_("Allocation goal block in inode #%lld "
+ "(0x%llx) not fixed\n"),
+ (unsigned long long)ip->i_di.di_num.no_addr,
+ (unsigned long long)ip->i_di.di_num.no_addr);
+ }
+}
+
/*
* handle_di - This is now a wrapper function that takes a gfs2_buffer_head
* and calls handle_ip, which takes an in-code dinode structure.
*/
-static int handle_di(struct gfs2_sbd *sdp, struct gfs2_buffer_head *bh,
- struct rgrp_tree *rgd)
+static int handle_di(struct gfs2_sbd *sdp, struct gfs2_buffer_head *bh)
{
int error = 0;
uint64_t block = bh->b_blocknr;
@@ -1252,7 +1276,7 @@ static int handle_di(struct gfs2_sbd *sdp, struct gfs2_buffer_head *bh,
(unsigned long long)block,
(unsigned long long)block);
}
- ip->i_rgd = rgd;
+ check_i_goal(sdp, ip);
error = handle_ip(sdp, ip);
fsck_inode_put(&ip);
return error;
@@ -1378,6 +1402,7 @@ static int check_system_inode(struct gfs2_sbd *sdp,
"directory entries.\n"), filename);
}
}
+ check_i_goal(sdp, *sysinode);
error = handle_ip(sdp, *sysinode);
return error ? error : err;
}
@@ -1602,7 +1627,7 @@ static int pass1_process_bitmap(struct gfs2_sbd *sdp, struct rgrp_tree *rgd, uin
(unsigned long long)block,
(unsigned long long)block);
check_n_fix_bitmap(sdp, block, 0, GFS2_BLKST_FREE);
- } else if (handle_di(sdp, bh, rgd) < 0) {
+ } else if (handle_di(sdp, bh) < 0) {
stack;
brelse(bh);
gfs2_special_free(&gfs1_rindex_blks);
diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
index f1f81d3..ccae721 100644
--- a/gfs2/libgfs2/libgfs2.h
+++ b/gfs2/libgfs2/libgfs2.h
@@ -233,7 +233,6 @@ struct gfs2_inode {
struct gfs2_dinode i_di;
struct gfs2_buffer_head *i_bh;
struct gfs2_sbd *i_sbd;
- struct rgrp_tree *i_rgd; /* The rgrp this inode is in */
};
struct master_dir

15
gating.yaml Normal file
View file

@ -0,0 +1,15 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_testing
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}

View file

@ -1,24 +1,14 @@
###############################################################################
###############################################################################
##
## Copyright (C) 2004-2014 Red Hat, Inc. All rights reserved.
##
## This copyrighted material is made available to anyone wishing to use,
## modify, copy, or redistribute it subject to the terms and conditions
## of the GNU General Public License v.2.
##
###############################################################################
###############################################################################
Name: gfs2-utils
Version: 3.1.8
Release: 7%{?dist}
License: GPLv2+ and LGPLv2+
Group: System Environment/Kernel
Version: 3.6.1
Release: 2%{?dist}
# Refer to doc/README.licence in the upstream tarball
License: GPL-2.0-or-later AND LGPL-2.1-or-later
Summary: Utilities for managing the global file system (GFS2)
%ifnarch %{arm}
%{?fedora:Requires: kmod(gfs2.ko) kmod(dlm.ko)}
%{?fedora:Recommends: kmod(gfs2.ko) kmod(dlm.ko)}
%endif
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}
BuildRequires: ncurses-devel
BuildRequires: kernel-headers
BuildRequires: automake
@ -28,52 +18,35 @@ BuildRequires: gettext-devel
BuildRequires: bison
BuildRequires: flex
BuildRequires: libblkid-devel
BuildRequires: libuuid-devel
BuildRequires: check-devel
Source: https://fedorahosted.org/released/gfs2-utils/gfs2-utils-%{version}.tar.gz
URL: https://fedorahosted.org/cluster/wiki/HomePage
Patch0: fsck_gfs2_replace_recent_i_goal_fixes_with_simple_logic.patch
Patch1: gfs2_utils_Fix_hang_on_withdraw.patch
Patch2: scripts_rename_gfs2_wd_udev_sh_to_gfs2_withdraw_helper.patch
Patch3: scripts_install_the_withdraw_helper_script.patch
Patch4: scripts_install_the_withdraw_udev_rules_script.patch
Patch5: 1307532-1-libgfs2_Add_support_for_dirent_de_rahead.patch
Patch6: 1307532-2-gfs2_edit_Include_dirent_de_rahead_in_directory_listings.patch
Patch7: 1307532-3-gfs2_utils_Add_a_check_for_the_de_rahead_field.patch
Patch8: 1307532-4-libgfs2_Support_the_new_dirent_de_cookie_field.patch
BuildRequires: bzip2-devel
BuildRequires: make
Source: https://releases.pagure.org/gfs2-utils/gfs2-utils-%{version}.tar.gz
URL: https://pagure.io/gfs2-utils
%prep
%setup -q -n gfs2-utils-%{version}
%patch0 -p 1 -b .fsck_gfs2_replace_recent_i_goal_fixes_with_simple_logic
%patch1 -p 1 -b .gfs2_utils_Fix_hang_on_withdraw
%patch2 -p 1 -b .scripts_rename_gfs2_wd_udev_sh_to_gfs2_withdraw_helper
%patch3 -p 1 -b .scripts_install_the_withdraw_helper_script
%patch4 -p 1 -b .scripts_install_the_withdraw_udev_rules_script
%patch5 -p 1 -b .1307532-1-libgfs2_Add_support_for_dirent_de_rahead
%patch6 -p 1 -b .1307532-2-gfs2_edit_Include_dirent_de_rahead_in_directory_listings
%patch7 -p 1 -b .1307532-3-gfs2_utils_Add_a_check_for_the_de_rahead_field
%patch8 -p 1 -b .1307532-4-libgfs2_Support_the_new_dirent_de_cookie_field
%autosetup -p1
%build
./autogen.sh
%configure
make %{_smp_mflags} V=1
%make_build
%check
make check || { cat tests/testsuite.log; exit 1; }
%install
make -C gfs2 install DESTDIR=%{buildroot}
%make_install
# Don't ship gfs2_{trace,lockcapture} in this package
rm -f %{buildroot}/usr/sbin/gfs2_trace
rm -f %{buildroot}/usr/sbin/gfs2_lockcapture
rm -f %{buildroot}%{_sbindir}/gfs2_trace
rm -f %{buildroot}%{_sbindir}/gfs2_lockcapture
rm -f %{buildroot}%{_mandir}/man8/gfs2_trace.8
rm -f %{buildroot}%{_mandir}/man8/gfs2_lockcapture.8
%description
The gfs2-utils package contains a number of utilities for creating,
checking, modifying, and correcting any inconsistencies in GFS2
file systems.
The gfs2-utils package contains a number of utilities for creating, checking,
modifying, and correcting inconsistencies in GFS2 file systems.
%files
%doc doc/COPYING.* doc/COPYRIGHT doc/*.txt
@ -82,15 +55,144 @@ file systems.
%{_sbindir}/gfs2_grow
%{_sbindir}/gfs2_jadd
%{_sbindir}/mkfs.gfs2
%{_sbindir}/gfs2_convert
%{_sbindir}/gfs2_edit
%{_sbindir}/tunegfs2
%{_sbindir}/gfs2_withdraw_helper
%{_sbindir}/glocktop
%{_libexecdir}/gfs2_withdraw_helper
%{_mandir}/man8/*gfs2*
%{_mandir}/man8/glocktop*
%{_mandir}/man5/*
%{_prefix}/lib/udev/rules.d/82-gfs2-withdraw.rules
%changelog
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Thu Feb 27 2025 Andrew Price <anprice@redhat.com> - 3.6.1-1
- New upstream release
* Mon Jan 20 2025 Andrew Price <anprice@redhat.com> - 3.5.1-7
- Don't hardcode /usr/sbin in the spec
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Apr 11 2023 Andrew Price <anprice@redhat.com> - 3.5.1-1
- New upstream release
* Thu Feb 09 2023 Andrew Price <anprice@redhat.com> - 3.5.0-1
- New upstream release
- Drop all patches
- Exclude i686 for https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
- Migrate to SPDX license identifier
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Jun 23 2022 Andrew Price <anprice@redhat.com> - 3.4.1-4
- gfs2/edit: always use "%s"-style format for printf()-style functions
- Custom patch to fix a printw() call missed by the above
Fixes a build failure due to format-security warnings being treated as errors
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon Mar 15 2021 Andrew Price <anprice@redhat.com> - 3.4.1-1
- New upstream version
* Mon Mar 08 2021 Andrew Price <anprice@redhat.com> - 3.4.0-1
- New upstream version
- Update testsuite script
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Thu Sep 03 2020 Andrew Price <anprice@redhat.com> - 3.3.0-2
- Version bump to enable gating tests
* Tue Sep 01 2020 Andrew Price <anprice@redhat.com> - 3.3.0-1
- New upstream version
- Add dependency on bzip2
- Drop all patches
- gfs2_withdraw_helper is now in /usr/libexec/
* Wed Jul 29 2020 Andrew Price <anprice@redhat.com> - 3.2.0-10
- tests: Don't use fail_unless in unit tests
Fixes build failures due to a regression in check-devel
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 21 2020 Andrew Price <anprice@redhat.com> - 3.2.0-8
- Use make_build and make_install macros
https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
- Remove -C gfs2 - it's a remnant from the cluster.git days
- Remove unnecessary header notice from spec file
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Mon Feb 04 2019 Andrew Price <anprice@redhat.com> - 3.2.0-5
- Fix libuuid linking
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Jun 21 2018 Andrew Price <anprice@redhat.com> - 3.2.0-2
- Recommend the gfs2 and dlm kmods instead of requiring them
Resolves: bz#1593411
* Thu May 24 2018 Andrew Price <anprice@redhat.com> - 3.2.0-1
- New upstream release
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.10-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Fri Oct 13 2017 Andrew Price <anprice@redhat.com> - 3.1.10-4
- Update URL in spec file
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.10-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.10-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Tue Mar 28 2017 Andrew Price <anprice@redhat.com> - 3.1.10-1
- New upstream release
- Make dependency on libuuid explicit
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Tue Jun 07 2016 Andrew Price <anprice@redhat.com> - 3.1.9-1
- New upstream release
- Drop all patches
- Add glocktop to the package
* Mon Feb 15 2016 Andrew Price <anprice@redhat.com> - 3.1.8-7
- libgfs2: Add support for dirent.de_rahead
- gfs2_edit: Include dirent.de_rahead in directory listings
@ -171,230 +273,3 @@ file systems.
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Tue Nov 13 2012 Andrew Price <anprice@redhat.com> - 3.1.5-1
- New upstream release
Removes mount.gfs2, gfs2_tool, gfs2_quota
- Remove rawhide_transition.patch - now obsolete
- Update BuildRequires:
Change glibc-kernheaders to kernel-headers
Add bison and flex
- Provide a valid url for Source0
- Add fix_build_on_rawhide.patch to fix a circular dep introduced in
bison 2.6, and a make -j race between libgfs2 and gfs2l
* Tue Aug 14 2012 Andrew Price <anprice@redhat.com> - 3.1.4-6
- Make the kernel-modules-extra requirement Fedora-specific
Resolves bz#847955
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Apr 17 2012 Andrew Price <anprice@redhat.com> - 3.1.4-4
- Remove commented-out sections
- Clean up some lintian warnings
- Add dependency on kernel-modules-extra as per bz#811547
* Wed Mar 07 2012 Andrew Price <anprice@redhat.com> - 3.1.4-3
- Remove redundant postinstall scriptlet
* Thu Feb 2 2012 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.1.4-2
- make sure to Obsolete gfs2-cluster
* Wed Feb 01 2012 Andrew Price <anprice@redhat.com> - 3.1.4-1
- New upstream release
Adds gfs2_lockgather script
- Remove gfs2-cluster (commented out for now)
- Remove dependency on corosynclib-devel and systemd-units
- Add rawhide_transition.patch to stop gfs_controld from building
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Thu Dec 15 2011 Andrew Price <anprice@redhat.com> - 3.1.3-1
- New upstream release
Bugfixes and improvements to fsck.gfs2
Fixes various other bugs
Improve strings and translation support
- Adds gfs2-cluster systemd unit
- Removes gfs2* init scripts
* Wed Jul 06 2011 Andrew Price <anprice@redhat.com> - 3.1.2-1
- New upstream release
Fixes several bugs
Improves translation support
Adds savemeta compression
- Add zlib-devel to BuildRequires
- Add gettext-devel to BuildRequires
* Wed May 25 2011 Steven Whitehouse <swhiteho@redhat.com> - 3.1.1-3
- Update wiki URL
- Remove gfs2_tool and gfs2_quota from package
* Fri Feb 25 2011 Bob Peterson <rpeterso@redhat.com> - 3.1.1-2
- Bumping release number to keep upgrades consistent.
* Wed Feb 23 2011 Bob Peterson <rpeterso@redhat.com> - 3.1.1-1
- gfs2_edit savemeta doesn't save all leafs for big directories
- gfs2_edit improvements
- fsck.gfs2: can't repair rgrps resulting from gfs_grow->gfs2_convert
- fsck.gfs2: reports master/root dinodes as unused and fixes bitmap
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Thu Jan 20 2011 Steven Whitehouse <swhiteho@redhat.com> - 3.1.0-4
- Drop mount.gfs2 and its man page
- Only list gfs2_tool once in the files list
* Wed Dec 8 2010 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.1.0-3
- Drop circular dependency on cman
* Fri Dec 3 2010 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.1.0-2
- gfs2-cluster should Obsoletes/Provides gfs-pcmk
* Tue Sep 30 2010 Steven Whitehouse <swhiteho@redhat.com> - 3.1.0-1
- Bringing this package back for upstream GFS2
Addition of gfs2tune to the utils
Merge of gfs_controld from cman
* Thu Jan 22 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 2.03.11-1
- New upstream release
Fix several bugs and drastically improve startup errors.
* Wed Dec 10 2008 Fabio M. Di Nitto <fdinitto@redhat.com> - 2.03.10-1
- New upstream release
Fix several bugs and port gfs1 code to match 2.6.27 kernel.
* Fri Oct 31 2008 Fabio M. Di Nitto <fdinitto@redhat.com> - 2.03.09-1
- New upstream release
Fix rhbz#468966
Addresses several security issues similar to CVE-2008-4192 and
CVE-2008-4579 after deep code audit from upstream
- cleanup patches to match 2.6.26 kernel in F-9
* Tue Oct 21 2008 Fabio M. Di Nitto <fdinitto@redhat.com> - 2.03.08-1
- New upstream release
Fix rhbz#460376 CVE-2008-4192
Fix rhbz#467386 CVE-2008-4579
- cleanup/update patches to match 2.6.26 kernel in F-9
* Thu Aug 14 2008 Fabio M. Di Nitto <fdinitto@redhat.com> - 2.03.07-1
- New upstream release
- Fix rgmanager startup locking issues
- Apply patch to include kernel headers from 2.6.26 required to build
userland. Userland will run in 2.6.25 compatibility mode
- Apply patch to keep kernel modules at 2.6.25 (upstream is at 2.6.26)
(this patch is purely cosmetic since we don't build kernel modules
but keep the source in sync is Good (tm))
- Cleanup packaging for installed docs and file permissions
* Mon Jul 14 2008 Fabio M. Di Nitto <fdinitto@redhat.com> - 2.03.05-1
- New upstream release
- Cleanup installed doc after upstream
* Wed Jun 11 2008 Fabio M. Di Nitto <fdinitto@redhat.com> 2.03.04-1
- New upstream release
- Resolves: #446995 #318271 #447378 #445662
- Update license tags after major upstream cleanup
- Include COPYRIGHT file
* Fri May 30 2008 Fabio M. Di Nitto <fdinitto@redhat.com> 2.03.03-1
- New upstream release
- Fix several build warnings
- Update spec files to use macros
- Update Requires to use packages rather than pointing at files
- Drop BR on kernel-devel since it's not required anymore
- Update build section to use proper _sysconfdir, libdir and sbindir
- Avoid abusing cd when we can ask make to do the work for us
- Remove /usr/sbin from file section. We don't have any file there
and we can avoid shipping stuff by mistake
* Mon Apr 14 2008 Steven Whitehouse <swhiteho@redhat.com> 2.03.00-3
- Fabbione saves the day. We can get rid of the sed stuff after all
* Mon Apr 14 2008 Steven Whitehouse <swhiteho@redhat.com> 2.03.00-1
- New upstream sources
- Eric Sandeen's solution to kernel version dep
* Wed Apr 09 2008 Steven Whitehouse <swhiteho@redhat.com> 0.1.25.2.02.01-15
- Remove obsolete chkconfig patch for initscript
- Enable parallel make
- Remove obsolete copy of gfs2_ondisk.h (this should be in glibc-kernheaders)
* Wed Apr 09 2008 Steven Whitehouse <swhiteho@redhat.com> 0.1.25.2.02.01-14
- Update URL
- Fix license spec
* Fri Mar 14 2008 Chris Feist <cfeist@redhat.com> 0.1.25.2.02.00-2
- New upstream sources.
* Tue Jan 16 2007 Chris Feist <cfeist@redhat.com> 0.1.24-1
- New upstream sources.
- Resolves: rhbz#222747
* Wed Jan 03 2007 Chris Feist <cfeist@redhat.com> 0.1.24-1
- Updated sources
- Resolves: rhbz#218560
* Thu Dec 21 2006 Chris Feist <cfeist@redhat.com> 0.1.23-1
- Updated sources
- Resolves: rhbz#218560
* Tue Dec 19 2006 Chris Feist <cfeist@redhat.com> 0.1.22-1
- New upstream sources.
- Resolves: rhbz#219878
* Tue Dec 04 2006 Chris Feist <cfeist@redhat.com> 0.1.21-1
- New upstream sources.
- Resolves: rhbz#218134 rhbz#215962
* Thu Nov 30 2006 Chris Feist <cfeist@redhat.com> 0.1.19-1
- New upstream sources.
- Resolves: rhbz#217798
* Wed Nov 29 2006 Chris Feist <cfeist@redhat.com> 0.1.18-1
- New upstream sources.
- Resolves: rhbz#217460
* Thu Oct 26 2006 Chris Feist <cfeist@redhat.com> 0.1.14-1
- New upstream sources.
* Fri Oct 13 2006 Chris Feist <cfeist@redhat.com> 0.1.12-1
- New Upstream sources.
* Fri Oct 13 2006 Chris Feist <cfeist@redhat.com> 0.1.10-1
- New Upstream sources.
* Mon Oct 09 2006 Chris Feist <cfeist@redhat.com> 0.1.9-1
- New Upstream sources.
* Mon Sep 25 2006 Chris Feist <cfeist@redhat.com> 0.1.8-1
- New Upstream sources.
* Wed Sep 13 2006 Chris Feist <cfeist@redhat.com> 0.1.7-1
- New Upstream sources.
* Thu Sep 07 2006 Chris Feist <cfeist@redhat.com> 0.1.6-2
- Fix typo in uninstall script (turn off gfs2 instead of gfs)
* Mon Aug 28 2006 Chris Feist <cfeist@redhat.com> 0.1.6-1
- New Upstream sources.
* Tue Aug 22 2006 Chris Feist <cfeist@redhat.com> 0.1.5-1
- New Upstream sources.
* Mon Aug 14 2006 Chris Feist <cfeist@redhat.com> 0.1.3-0
- New Upstream sources, use dist tag.
* Fri Jul 14 2006 Chris Feist <cfeist@redhat.com>
- Rebuild with updated sources
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com>
- rebuild
* Tue Jun 27 2006 Florian La Roche <laroche@redhat.com>
- fix typo in preun script
* Fri Jun 09 2006 Chris Feist <cfeist@redhat.com> - 0.1.0-1.fc6.3
- Initial build of gfs-utils.

View file

@ -1,97 +0,0 @@
commit 4e9a8f12b74d61314e79904a0f02e42e99a98493
Author: Abhi Das <adas@redhat.com>
Date: Tue Aug 4 11:00:51 2015 -0500
gfs2-utils: Fix hang on withdraw
Issuing a withdraw on a gfs2 filesystem causes a hang. When
gfs_controld was removed, the userspace functionality that
completes a withdraw operation went away. This causes gfs2
kernel to hang waiting for a withdraw completion ack from
userspace.
This patchset introduces a uevent-based shell script to do
the job that gfs_controld used to do on withdraw. An 'offline'
uevent triggers the execution of this script. This script
suspends the device associated with the filesystem and signals
a completed withdraw to the kernel.
Resolves: rhbz#1225634
Signed-off-by: Abhi Das <adas@redhat.com>
diff --git a/README.build b/README.build
index f4ebe53..6487bae 100644
--- a/README.build
+++ b/README.build
@@ -29,5 +29,14 @@ To install gfs2-utils, run:
make install
+The following scripts (located in gfs2/scripts) are used to complete
+the userland portion of the gfs2 withdraw feature using uevents. They
+are not installed by 'make install' and need to be installed manually
+or during rpm installation to the corresponding locations.
+
+ 82-gfs2-withdraw.rules in /etc/udev/rules.d/
+ gfs2_wd_udev.sh in /usr/sbin/
+
See also doc/README.contributing for details on submitting patches and
doc/README.tests for more details regarding the test suite.
+
diff --git a/gfs2/scripts/82-gfs2-withdraw.rules b/gfs2/scripts/82-gfs2-withdraw.rules
new file mode 100644
index 0000000..2228615
--- /dev/null
+++ b/gfs2/scripts/82-gfs2-withdraw.rules
@@ -0,0 +1,2 @@
+SUBSYSTEM=="gfs2", ACTION=="offline", RUN+="/bin/sh /usr/sbin/gfs2_wd_udev.sh"
+
diff --git a/gfs2/scripts/Makefile.am b/gfs2/scripts/Makefile.am
index 62fb2fe..dde906f 100644
--- a/gfs2/scripts/Makefile.am
+++ b/gfs2/scripts/Makefile.am
@@ -3,3 +3,8 @@ MAINTAINERCLEANFILES = Makefile.in
dist_sbin_SCRIPTS = \
gfs2_lockcapture \
gfs2_trace
+
+noinst_SCRIPTS = \
+ 82-gfs2-withdraw.rules \
+ gfs2_wd_udev.sh
+
diff --git a/gfs2/scripts/gfs2_wd_udev.sh b/gfs2/scripts/gfs2_wd_udev.sh
new file mode 100755
index 0000000..ac3ce35
--- /dev/null
+++ b/gfs2/scripts/gfs2_wd_udev.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# Do not run this script manually. This script is called by udev on a gfs2
+# withdraw uevent and is used to complete the withdraw action and notify the
+# kernel.
+#
+
+# Sanity checks
+if [ "$SUBSYSTEM" != "gfs2" ] || [ "$LOCKPROTO" != "lock_dlm" ] ||
+ [ -z "$DEVPATH" ] || [ "$ACTION" != "offline" ]
+then
+ exit 1 # Nothing to do here
+fi
+
+# Try and suspend the device
+SYSFS_TOPDIR="/sys"$DEVPATH
+DM_NAME=$(cat "$SYSFS_TOPDIR/device/dm/name")
+DM_DEV="/dev/mapper/"$DM_NAME
+
+if [ -z "$DM_DEV" ]
+then
+ /usr/bin/dmsetup suspend $DM_DEV
+fi
+
+# Signal completion of withdraw
+WD_ACK="$SYSFS_TOPDIR/lock_module/withdraw"
+if [ -f "$WD_ACK" ]
+then
+ echo "1" > $WD_ACK
+fi

5
plans/testsuite.fmf Normal file
View file

@ -0,0 +1,5 @@
summary: Run testsuite
discover:
how: fmf
execute:
how: tmt

View file

@ -1,27 +0,0 @@
commit fdded71f349ec5928a1422bc7edaa7f4f6c0be26
Author: Andrew Price <anprice@redhat.com>
Date: Tue Aug 18 12:48:50 2015 +0100
scripts: install the withdraw helper script
Install gfs2_withdraw_helper into /usr/sbin in 'make install'.
Signed-off-by: Andrew Price <anprice@redhat.com>
diff --git a/gfs2/scripts/Makefile.am b/gfs2/scripts/Makefile.am
index 51764fa..056aaa5 100644
--- a/gfs2/scripts/Makefile.am
+++ b/gfs2/scripts/Makefile.am
@@ -2,9 +2,9 @@ MAINTAINERCLEANFILES = Makefile.in
dist_sbin_SCRIPTS = \
gfs2_lockcapture \
- gfs2_trace
+ gfs2_trace \
+ gfs2_withdraw_helper
noinst_SCRIPTS = \
- 82-gfs2-withdraw.rules \
- gfs2_withdraw_helper
+ 82-gfs2-withdraw.rules

View file

@ -1,72 +0,0 @@
commit 9aa261bd5e65beb757b0953ba43211fc29641952
Author: Andrew Price <anprice@redhat.com>
Date: Wed Aug 19 12:13:39 2015 +0100
scripts: install the withdraw udev rules script
Add a --with-udevdir configure option and default to $prefix/lib/udev.
Note that we can't use $libdir for this as that will often be /usr/lib64
and the udevdir is arch-independent.
Also add the autoconf bits needed to install 82-gfs2-withdraw.rules into
$udevdir/rules.d
Signed-off-by: Andrew Price <anprice@redhat.com>
diff --git a/README.build b/README.build
index acfde1b..d0a21c3 100644
--- a/README.build
+++ b/README.build
@@ -31,10 +31,9 @@ To install gfs2-utils, run:
The following scripts (located in gfs2/scripts) are used to complete
the userland portion of the gfs2 withdraw feature using uevents. They
-are not installed by 'make install' and need to be installed manually
-or during rpm installation to the corresponding locations.
+will be installed by 'make install' to these directories by default:
- 82-gfs2-withdraw.rules in /etc/udev/rules.d/
+ 82-gfs2-withdraw.rules in /usr/lib/udev/rules.d/
gfs2_withdraw_helper in /usr/sbin/
See also doc/README.contributing for details on submitting patches and
diff --git a/configure.ac b/configure.ac
index de96e5a..35cafe6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -110,6 +110,12 @@ if test -z "$ncurses_CFLAGS" && test -z "$ncurses_LIBS"; then
ncurses_LIBS=-lncurses
fi
+AC_ARG_WITH([udevdir],
+ AS_HELP_STRING([--with-udevdir=DIR],
+ [udev directory containing rules.d [default=${prefix}/lib/udev]]),
+ [], [with_udevdir=\${prefix}/lib/udev])
+AC_SUBST([udevdir], [$with_udevdir])
+
# Checks for header files.
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])])
@@ -209,7 +215,9 @@ echo " Configure summary"
echo " ==================="
echo " prefix : $prefix"
echo " exec_prefix : $exec_prefix"
+echo " libdir : $libdir"
echo " sbindir : $sbindir"
+echo " udevdir : $udevdir"
echo " ------------------"
echo " debug build : $enable_debug"
echo " C unit tests : $have_check"
diff --git a/gfs2/scripts/Makefile.am b/gfs2/scripts/Makefile.am
index 056aaa5..d4bda04 100644
--- a/gfs2/scripts/Makefile.am
+++ b/gfs2/scripts/Makefile.am
@@ -5,6 +5,6 @@ dist_sbin_SCRIPTS = \
gfs2_trace \
gfs2_withdraw_helper
-noinst_SCRIPTS = \
+udevrulesdir=@udevdir@/rules.d
+dist_udevrules_DATA = \
82-gfs2-withdraw.rules
-

View file

@ -1,115 +0,0 @@
commit bdb6bb67ee4532c2dfb65eeeebcec06bda99d4ff
Author: Andrew Price <anprice@redhat.com>
Date: Tue Aug 18 12:35:52 2015 +0100
scripts: rename gfs2_wd_udev.sh to gfs2_withdraw_helper
Makes the name more descriptive and consistent with the name of the udev
rules script.
Signed-off-by: Andrew Price <anprice@redhat.com>
diff --git a/README.build b/README.build
index 6487bae..acfde1b 100644
--- a/README.build
+++ b/README.build
@@ -35,7 +35,7 @@ are not installed by 'make install' and need to be installed manually
or during rpm installation to the corresponding locations.
82-gfs2-withdraw.rules in /etc/udev/rules.d/
- gfs2_wd_udev.sh in /usr/sbin/
+ gfs2_withdraw_helper in /usr/sbin/
See also doc/README.contributing for details on submitting patches and
doc/README.tests for more details regarding the test suite.
diff --git a/gfs2/scripts/82-gfs2-withdraw.rules b/gfs2/scripts/82-gfs2-withdraw.rules
index 2228615..2c9e0e8 100644
--- a/gfs2/scripts/82-gfs2-withdraw.rules
+++ b/gfs2/scripts/82-gfs2-withdraw.rules
@@ -1,2 +1,2 @@
-SUBSYSTEM=="gfs2", ACTION=="offline", RUN+="/bin/sh /usr/sbin/gfs2_wd_udev.sh"
+SUBSYSTEM=="gfs2", ACTION=="offline", RUN+="/bin/sh /usr/sbin/gfs2_withdraw_helper"
diff --git a/gfs2/scripts/Makefile.am b/gfs2/scripts/Makefile.am
index dde906f..51764fa 100644
--- a/gfs2/scripts/Makefile.am
+++ b/gfs2/scripts/Makefile.am
@@ -6,5 +6,5 @@ dist_sbin_SCRIPTS = \
noinst_SCRIPTS = \
82-gfs2-withdraw.rules \
- gfs2_wd_udev.sh
+ gfs2_withdraw_helper
diff --git a/gfs2/scripts/gfs2_wd_udev.sh b/gfs2/scripts/gfs2_wd_udev.sh
deleted file mode 100755
index ac3ce35..0000000
--- a/gfs2/scripts/gfs2_wd_udev.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-#
-# Do not run this script manually. This script is called by udev on a gfs2
-# withdraw uevent and is used to complete the withdraw action and notify the
-# kernel.
-#
-
-# Sanity checks
-if [ "$SUBSYSTEM" != "gfs2" ] || [ "$LOCKPROTO" != "lock_dlm" ] ||
- [ -z "$DEVPATH" ] || [ "$ACTION" != "offline" ]
-then
- exit 1 # Nothing to do here
-fi
-
-# Try and suspend the device
-SYSFS_TOPDIR="/sys"$DEVPATH
-DM_NAME=$(cat "$SYSFS_TOPDIR/device/dm/name")
-DM_DEV="/dev/mapper/"$DM_NAME
-
-if [ -z "$DM_DEV" ]
-then
- /usr/bin/dmsetup suspend $DM_DEV
-fi
-
-# Signal completion of withdraw
-WD_ACK="$SYSFS_TOPDIR/lock_module/withdraw"
-if [ -f "$WD_ACK" ]
-then
- echo "1" > $WD_ACK
-fi
diff --git a/gfs2/scripts/gfs2_withdraw_helper b/gfs2/scripts/gfs2_withdraw_helper
new file mode 100755
index 0000000..ac3ce35
--- /dev/null
+++ b/gfs2/scripts/gfs2_withdraw_helper
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# Do not run this script manually. This script is called by udev on a gfs2
+# withdraw uevent and is used to complete the withdraw action and notify the
+# kernel.
+#
+
+# Sanity checks
+if [ "$SUBSYSTEM" != "gfs2" ] || [ "$LOCKPROTO" != "lock_dlm" ] ||
+ [ -z "$DEVPATH" ] || [ "$ACTION" != "offline" ]
+then
+ exit 1 # Nothing to do here
+fi
+
+# Try and suspend the device
+SYSFS_TOPDIR="/sys"$DEVPATH
+DM_NAME=$(cat "$SYSFS_TOPDIR/device/dm/name")
+DM_DEV="/dev/mapper/"$DM_NAME
+
+if [ -z "$DM_DEV" ]
+then
+ /usr/bin/dmsetup suspend $DM_DEV
+fi
+
+# Signal completion of withdraw
+WD_ACK="$SYSFS_TOPDIR/lock_module/withdraw"
+if [ -f "$WD_ACK" ]
+then
+ echo "1" > $WD_ACK
+fi

View file

@ -1 +1 @@
f43b26f006b0a58d86a08eed579871f1 gfs2-utils-3.1.8.tar.gz
SHA512 (gfs2-utils-3.6.1.tar.gz) = c620cd7cac29af927a6325ffe024f3090285083f8a094935f318026e7fadb9b63cdbccc4962141ff93a2994fe32d138bf1ff999a58dfe268c034156132785346

8
tests/atlocal Normal file
View file

@ -0,0 +1,8 @@
GFS_TGT="../../testvol"
GFS_TGT_SZ=10
GFS_MKFS="mkfs.gfs2 -O -D"
gfs_max_blocks()
{
printf $((GFS_TGT_SZ*1073741824/$1))
}

20
tests/rgrifieldscheck.sh Executable file
View file

@ -0,0 +1,20 @@
#!/bin/sh
dev=$1
i=0
gfs2_edit -p rg 0 $dev | grep rg_data0 > /dev/null 2>&1
# New fields not present in /usr/include/linux/gfs2_ondisk.h
test $? = 0 || exit 0
gfs2_edit -p rindex $dev | while read field rival unused
do
test $field = ri_data0 -o $field = ri_data -o $field = ri_bitbytes || continue
rgfield=$(echo $field | sed 's/ri/rg/')
rgval=$(gfs2_edit -p rg $i $dev | grep " $rgfield " | awk '{print $2}')
if test "$rival" != "$rgval"
then
echo "Bad $rgfield in rg $i: $rgval (expected: $rival)" >&2
exit 1
fi
test $field = ri_bitbytes && i=$((i+1))
done

19
tests/rgskipcheck.sh Executable file
View file

@ -0,0 +1,19 @@
#!/bin/sh
dev=$1
rgcount=$(gfs2_edit -p rgcount $dev | cut -f1 -d' ')
prevaddr=$(gfs2_edit -p rg 0 $dev | grep ^RG | awk '{print $5}')
prevskip=0
for i in `seq 0 $(($rgcount - 1))`; do
addr=$(gfs2_edit -p rg $i $dev | grep ^RG | awk '{print $5}')
expected=$(($addr - $prevaddr))
if test $prevskip != $expected; then
echo "Bad rg_skip in rg $(($i - 1)): $prevskip (expected: $expected)" >&2
exit 1
fi
prevskip=$(gfs2_edit -p rg $i $dev | grep rg_skip | awk '{print $2}')
prevaddr=$addr
done

5612
tests/testsuite Executable file

File diff suppressed because it is too large Load diff

2
tests/testsuite.fmf Normal file
View file

@ -0,0 +1,2 @@
summary: Upstream testsuite
test: ./testsuite