Compare commits

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

44 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
Andrew Price
0b214d7cb0 * 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
- gfs2-utils: Add a check for the de_rahead field
- libgfs2: Support the new dirent de_cookie field
  Resolves: bz#1307532
2016-02-15 20:39:08 +00:00
Dennis Gilmore
8ee10a8095 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-03 21:21:07 +00:00
Andrew Price
6d1e4a09ae * Thu Aug 20 2015 Andrew Price <anprice@redhat.com> - 3.1.8-5
- Add patches to install the withdraw helper script properly:
  scripts_rename_gfs2_wd_udev_sh_to_gfs2_withdraw_helper.patch
  scripts_install_the_withdraw_helper_script.patch
  scripts_install_the_withdraw_udev_rules_script.patch
- Remove the obsolete udev script installation bits
2015-08-20 16:11:44 +01:00
Andrew Price
b4080e636c * Tue Aug 11 2015 Andrew Price <anprice@redhat.com> - 3.1.8-4
- gfs2-utils: Fix hang on withdraw
- Install udev withdraw handler scripts
2015-08-11 19:41:05 +01:00
12 changed files with 5861 additions and 571 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,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: 3%{?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,35 +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
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
%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
@ -65,13 +55,165 @@ file systems.
%{_sbindir}/gfs2_grow
%{_sbindir}/gfs2_jadd
%{_sbindir}/mkfs.gfs2
%{_sbindir}/gfs2_convert
%{_sbindir}/gfs2_edit
%{_sbindir}/tunegfs2
%{_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
- gfs2-utils: Add a check for the de_rahead field
- libgfs2: Support the new dirent de_cookie field
Resolves: bz#1307532
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.8-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Aug 20 2015 Andrew Price <anprice@redhat.com> - 3.1.8-5
- Add patches to install the withdraw helper script properly:
scripts_rename_gfs2_wd_udev_sh_to_gfs2_withdraw_helper.patch
scripts_install_the_withdraw_helper_script.patch
scripts_install_the_withdraw_udev_rules_script.patch
- Remove the obsolete udev script installation bits
* Tue Aug 11 2015 Andrew Price <anprice@redhat.com> - 3.1.8-4
- gfs2-utils: Fix hang on withdraw
- Install udev withdraw handler scripts
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
@ -131,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.

5
plans/testsuite.fmf Normal file
View file

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

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