Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=eb0c4f95ba…
Commit: eb0c4f95ba02103474058f7eaf7afd56787dc15b
Parent: 24aa23984a53b8eea7df48f0465f9a6bb4b31a5b
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Mon Feb 16 17:08:10 2015 +0000
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Mon Feb 23 18:33:50 2015 +0000
libgfs2: Remove some obsolete function declarations
These functions no longer exist or never existed so there's no need to
declare them in libgfs2.h
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/libgfs2/libgfs2.h | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
index 2907e8c..4d1e540 100644
--- a/gfs2/libgfs2/libgfs2.h
+++ b/gfs2/libgfs2/libgfs2.h
@@ -674,11 +674,8 @@ extern int compute_constants(struct gfs2_sbd *sdp);
extern int lgfs2_open_mnt(const char *path, int dirflags, int *dirfd, int devflags, int *devfd, struct mntent **mnt);
extern int lgfs2_open_mnt_dev(const char *path, int flags, struct mntent **mnt);
extern int lgfs2_open_mnt_dir(const char *path, int flags, struct mntent **mnt);
-extern int find_gfs2_meta(struct gfs2_sbd *sdp);
-extern int dir_exists(const char *dir);
extern int mount_gfs2_meta(struct gfs2_sbd *sdp, const char *path);
extern void cleanup_metafs(struct gfs2_sbd *sdp);
-extern int is_fsname(char *name);
/* recovery.c */
extern void gfs2_replay_incr_blk(struct gfs2_inode *ip, unsigned int *blk);
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=24aa23984a…
Commit: 24aa23984a53b8eea7df48f0465f9a6bb4b31a5b
Parent: 8cdcd433ea2a87ad5f77be9dfc0e94099f9ec719
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Thu Feb 19 23:55:53 2015 +0000
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Mon Feb 23 18:33:50 2015 +0000
libgfs2: Use the correct parent for rgrp tree insertion
lgfs2_rgrps_append() was using the parent of the last rgrp instead of
the last rgrp itself as the intended parent when inserting new rgrps
into the tree. This left the tree unbalanced in such a way as to make
lookups of the last node in the tree effectively a linear list search.
This was done for each rgrp insertion so, although it didn't cause a
noticeable slow-down for smaller file sytems, tests on 250TB volumes
requiring over a million resource groups would become CPU bound and
could take hours to complete.
This patch fixes lgfs2_rgrps_append() to use the correct parent node for
rgrp tree insertions, giving a significant performance improvement when
creating file systems on large volumes.
Resolves: rhbz#1194446
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/libgfs2/rgrp.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/gfs2/libgfs2/rgrp.c b/gfs2/libgfs2/rgrp.c
index ed8e01d..cf4385a 100644
--- a/gfs2/libgfs2/rgrp.c
+++ b/gfs2/libgfs2/rgrp.c
@@ -539,9 +539,9 @@ struct osi_node *lgfs2_rgrps_root(lgfs2_rgrps_t rgs)
lgfs2_rgrp_t lgfs2_rgrps_append(lgfs2_rgrps_t rgs, struct gfs2_rindex *entry)
{
lgfs2_rgrp_t rg;
- lgfs2_rgrp_t lastrg = (lgfs2_rgrp_t)osi_last(&rgs->root);
struct osi_node **link = &rgs->root.osi_node;
- struct osi_node *parent = NULL;
+ struct osi_node *parent = osi_last(&rgs->root);
+ lgfs2_rgrp_t lastrg = (lgfs2_rgrp_t)parent;
errno = EINVAL;
if (entry == NULL)
@@ -550,7 +550,6 @@ lgfs2_rgrp_t lgfs2_rgrps_append(lgfs2_rgrps_t rgs, struct gfs2_rindex *entry)
if (lastrg != NULL) { /* Tree is not empty */
if (entry->ri_addr <= lastrg->ri.ri_addr)
return NULL; /* Appending with a lower address doesn't make sense */
- parent = osi_parent(&lastrg->node);
link = &lastrg->node.osi_right;
}
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=58bf864d8a…
Commit: 58bf864d8a6da5a1013280c767ec166c28cbcf55
Parent: 286a02668d6433cd62faf2ebb212bb4203f9f2c8
Author: Bob Peterson <rpeterso(a)redhat.com>
AuthorDate: Fri Jan 23 09:12:57 2015 -0600
Committer: Bob Peterson <rpeterso(a)redhat.com>
CommitterDate: Fri Feb 13 08:34:31 2015 -0600
fsck.gfs2: Fix journal sequence number reporting problem
This bug was spotted by coverity. The fsck.gfs2 should include a line
to report the number of journal sequence errors fixed. It was coded
improperly so that it was never displayed. This patch fixes the code
so that the message will be printed properly.
---
gfs2/fsck/fs_recovery.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/gfs2/fsck/fs_recovery.c b/gfs2/fsck/fs_recovery.c
index abb8187..9be5a95 100644
--- a/gfs2/fsck/fs_recovery.c
+++ b/gfs2/fsck/fs_recovery.c
@@ -436,10 +436,9 @@ static int check_journal_seq_no(struct gfs2_inode *ip, int fix)
(unsigned long long)lowest_seq,
(unsigned long long)highest_seq,
(unsigned long long)prev_seq);
- if (!fix) {
- seq_errors++;
+ seq_errors++;
+ if (!fix)
continue;
- }
highest_seq++;
lh.lh_sequence = highest_seq;
prev_seq = lh.lh_sequence;
@@ -449,8 +448,10 @@ static int check_journal_seq_no(struct gfs2_inode *ip, int fix)
gfs2_log_header_out(&lh, bh);
brelse(bh);
}
- if (seq_errors && fix)
+ if (seq_errors && fix) {
log_err(_("%d sequence errors fixed.\n"), seq_errors);
+ seq_errors = 0;
+ }
return seq_errors;
}