cluster: STABLE3 - gfs2: fix regressions from performance fixes
by Bob Peterson
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 0247047ad88bb1a16d72f5237053ce1fd014b85f
Parent: 953b67780ad01166f8d0fc20d57dc8ee65e6d31e
Author: Bob Peterson <rpeterso(a)redhat.com>
AuthorDate: Thu Feb 25 13:18:14 2010 -0600
Committer: Bob Peterson <rpeterso(a)redhat.com>
CommitterDate: Thu Feb 25 13:19:48 2010 -0600
gfs2: fix regressions from performance fixes
This patch fixes regressions recently introduced by the performance
enhancements for fsck.gfs2 and libgfs2.
rhbz#568446
---
gfs2/edit/hexedit.c | 2 +-
gfs2/edit/savemeta.c | 3 ++-
gfs2/libgfs2/fs_ops.c | 12 ++++--------
gfs2/libgfs2/structures.c | 16 ++++++++++------
gfs2/mkfs/main_grow.c | 2 ++
gfs2/mkfs/main_mkfs.c | 1 +
6 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c
index 45dfcc4..109f9c0 100644
--- a/gfs2/edit/hexedit.c
+++ b/gfs2/edit/hexedit.c
@@ -2536,7 +2536,7 @@ static void process_field(const char *field, uint64_t *newval, int print_field)
struct gfs2_rgrp rg;
fblock = blockstack[blockhist % BLOCK_STACK_SIZE].block;
- rbh = bread(&sbd, block);
+ rbh = bread(&sbd, fblock);
type = get_block_type(rbh);
switch (type) {
case GFS2_METATYPE_SB:
diff --git a/gfs2/edit/savemeta.c b/gfs2/edit/savemeta.c
index 496a7d2..f6d136f 100644
--- a/gfs2/edit/savemeta.c
+++ b/gfs2/edit/savemeta.c
@@ -133,7 +133,7 @@ static void warm_fuzzy_stuff(uint64_t wfsblock, int force, int save)
if (last_fs_block) {
printf("\r");
if (save) {
- percent = (block * 100) / last_fs_block;
+ percent = (wfsblock * 100) / last_fs_block;
printf("%" PRIu64 " metadata blocks (%"
PRIu64 "%%) processed, ", wfsblock,
percent);
@@ -299,6 +299,7 @@ static void save_indirect_blocks(int out_fd, osi_list_t *cur_list,
if (height != hgt) { /* If not at max height */
nbh = bread(&sbd, indir_block);
osi_list_add_prev(&nbh->b_altlist, cur_list);
+ brelse(nbh);
}
} /* for all data on the indirect block */
}
diff --git a/gfs2/libgfs2/fs_ops.c b/gfs2/libgfs2/fs_ops.c
index 254c705..7c698ef 100644
--- a/gfs2/libgfs2/fs_ops.c
+++ b/gfs2/libgfs2/fs_ops.c
@@ -674,14 +674,10 @@ struct gfs2_buffer_head *get_file_buf(struct gfs2_inode *ip, uint64_t lbn,
bmodified(ip->i_bh);
ip->i_di.di_size = (lbn + 1) << sdp->sd_sb.sb_bsize_shift;
}
- if (new)
- return bget(sdp, dbn);
- else {
- if (dbn == ip->i_di.di_num.no_addr)
- return ip->i_bh;
- else
- return bread(sdp, dbn);
- }
+ if (dbn == ip->i_di.di_num.no_addr)
+ return ip->i_bh;
+ else
+ return bread(sdp, dbn);
}
int gfs2_dirent_first(struct gfs2_inode *dip, struct gfs2_buffer_head *bh,
diff --git a/gfs2/libgfs2/structures.c b/gfs2/libgfs2/structures.c
index b1dd4ff..37ed8e6 100644
--- a/gfs2/libgfs2/structures.c
+++ b/gfs2/libgfs2/structures.c
@@ -105,6 +105,7 @@ int write_journal(struct gfs2_sbd *sdp, struct gfs2_inode *ip, unsigned int j,
if (!bh)
return -1;
+ memset(bh->b_data, 0, sdp->bsize);
lh.lh_sequence = seq;
lh.lh_blkno = x;
gfs2_log_header_out(&lh, bh);
@@ -205,6 +206,8 @@ static int build_quota_change(struct gfs2_inode *per_node, unsigned int j)
struct gfs2_inode *ip;
unsigned int blocks = sdp->qcsize << (20 - sdp->sd_sb.sb_bsize_shift);
unsigned int x;
+ unsigned int hgt;
+ struct gfs2_buffer_head *bh;
memset(&mh, 0, sizeof(struct gfs2_meta_header));
mh.mh_magic = GFS2_MAGIC;
@@ -212,16 +215,18 @@ static int build_quota_change(struct gfs2_inode *per_node, unsigned int j)
mh.mh_format = GFS2_FORMAT_QC;
sprintf(name, "quota_change%u", j);
- ip = createi(per_node, name, S_IFREG | 0600,
- GFS2_DIF_SYSTEM);
+ ip = createi(per_node, name, S_IFREG | 0600, GFS2_DIF_SYSTEM);
+
+ hgt = calc_tree_height(ip, (blocks + 1) * sdp->bsize);
+ build_height(ip, hgt);
for (x = 0; x < blocks; x++) {
- struct gfs2_buffer_head *bh = get_file_buf(ip, ip->i_di.di_size >> sdp->sd_sb.sb_bsize_shift, FALSE);
+ bh = get_file_buf(ip, x, FALSE);
if (!bh)
return -1;
+ memset(bh->b_data, 0, sdp->bsize);
gfs2_meta_header_out(&mh, bh);
-
brelse(bh);
}
@@ -302,8 +307,7 @@ int build_rindex(struct gfs2_sbd *sdp)
ip->i_di.di_payload_format = GFS2_FORMAT_RI;
bmodified(ip->i_bh);
- for (head = &sdp->rglist, tmp = head->next;
- tmp != head;
+ for (head = &sdp->rglist, tmp = head->next; tmp != head;
tmp = tmp->next) {
rl = osi_list_entry(tmp, struct rgrp_list, list);
diff --git a/gfs2/mkfs/main_grow.c b/gfs2/mkfs/main_grow.c
index 4245155..e622b3b 100644
--- a/gfs2/mkfs/main_grow.c
+++ b/gfs2/mkfs/main_grow.c
@@ -206,6 +206,8 @@ static void fix_rindex(struct gfs2_sbd *sdp, int rindex_fd, int old_rg_count)
gfs2_rindex_out(&rl->ri, bufptr);
bufptr += sizeof(struct gfs2_rindex);
}
+ gfs2_rgrp_free(&sdp->rglist);
+ fsync(sdp->device_fd);
if (!test) {
/* Now write the new RGs to the end of the rindex */
lseek(rindex_fd, 0, SEEK_END);
diff --git a/gfs2/mkfs/main_mkfs.c b/gfs2/mkfs/main_mkfs.c
index ceff0dc..50e3550 100644
--- a/gfs2/mkfs/main_mkfs.c
+++ b/gfs2/mkfs/main_mkfs.c
@@ -639,6 +639,7 @@ void main_mkfs(int argc, char *argv[])
inode_put(&sdp->md.inum);
inode_put(&sdp->md.statfs);
+ gfs2_rgrp_free(&sdp->rglist);
error = fsync(sdp->device_fd);
if (error)
die( _("can't fsync device (%d): %s\n"),
14 years, 2 months
gfs2-utils: master - gfs2: fix regressions from performance fixes
by Bob Peterson
Gitweb: http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitd...
Commit: d67c1edbb7711f17d7967ff4072ac05bb77b74b9
Parent: b1eca171e483b4b37cd64d78c884649471701467
Author: Bob Peterson <rpeterso(a)redhat.com>
AuthorDate: Thu Feb 25 13:18:14 2010 -0600
Committer: Bob Peterson <rpeterso(a)redhat.com>
CommitterDate: Thu Feb 25 13:23:27 2010 -0600
gfs2: fix regressions from performance fixes
This patch fixes regressions recently introduced by the performance
enhancements for fsck.gfs2 and libgfs2.
rhbz#568446
---
gfs2/edit/hexedit.c | 2 +-
gfs2/edit/savemeta.c | 3 ++-
gfs2/libgfs2/fs_ops.c | 12 ++++--------
gfs2/libgfs2/structures.c | 16 ++++++++++------
gfs2/mkfs/main_grow.c | 2 ++
gfs2/mkfs/main_mkfs.c | 1 +
6 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c
index 3e34281..d89b137 100644
--- a/gfs2/edit/hexedit.c
+++ b/gfs2/edit/hexedit.c
@@ -2538,7 +2538,7 @@ static void process_field(const char *field, uint64_t *newval, int print_field)
struct gfs2_rgrp rg;
fblock = blockstack[blockhist % BLOCK_STACK_SIZE].block;
- rbh = bread(&sbd, block);
+ rbh = bread(&sbd, fblock);
type = get_block_type(rbh);
switch (type) {
case GFS2_METATYPE_SB:
diff --git a/gfs2/edit/savemeta.c b/gfs2/edit/savemeta.c
index 45c9cb7..bc1976c 100644
--- a/gfs2/edit/savemeta.c
+++ b/gfs2/edit/savemeta.c
@@ -135,7 +135,7 @@ static void warm_fuzzy_stuff(uint64_t wfsblock, int force, int save)
if (last_fs_block) {
printf("\r");
if (save) {
- percent = (block * 100) / last_fs_block;
+ percent = (wfsblock * 100) / last_fs_block;
printf("%" PRIu64 " metadata blocks (%"
PRIu64 "%%) processed, ", wfsblock,
percent);
@@ -301,6 +301,7 @@ static void save_indirect_blocks(int out_fd, osi_list_t *cur_list,
if (height != hgt) { /* If not at max height */
nbh = bread(&sbd, indir_block);
osi_list_add_prev(&nbh->b_altlist, cur_list);
+ brelse(nbh);
}
} /* for all data on the indirect block */
}
diff --git a/gfs2/libgfs2/fs_ops.c b/gfs2/libgfs2/fs_ops.c
index 4a6d7e9..4590409 100644
--- a/gfs2/libgfs2/fs_ops.c
+++ b/gfs2/libgfs2/fs_ops.c
@@ -676,14 +676,10 @@ struct gfs2_buffer_head *get_file_buf(struct gfs2_inode *ip, uint64_t lbn,
bmodified(ip->i_bh);
ip->i_di.di_size = (lbn + 1) << sdp->sd_sb.sb_bsize_shift;
}
- if (new)
- return bget(sdp, dbn);
- else {
- if (dbn == ip->i_di.di_num.no_addr)
- return ip->i_bh;
- else
- return bread(sdp, dbn);
- }
+ if (dbn == ip->i_di.di_num.no_addr)
+ return ip->i_bh;
+ else
+ return bread(sdp, dbn);
}
int gfs2_dirent_first(struct gfs2_inode *dip, struct gfs2_buffer_head *bh,
diff --git a/gfs2/libgfs2/structures.c b/gfs2/libgfs2/structures.c
index 704bf00..c0a9832 100644
--- a/gfs2/libgfs2/structures.c
+++ b/gfs2/libgfs2/structures.c
@@ -107,6 +107,7 @@ int write_journal(struct gfs2_sbd *sdp, struct gfs2_inode *ip, unsigned int j,
if (!bh)
return -1;
+ memset(bh->b_data, 0, sdp->bsize);
lh.lh_sequence = seq;
lh.lh_blkno = x;
gfs2_log_header_out(&lh, bh);
@@ -207,6 +208,8 @@ static int build_quota_change(struct gfs2_inode *per_node, unsigned int j)
struct gfs2_inode *ip;
unsigned int blocks = sdp->qcsize << (20 - sdp->sd_sb.sb_bsize_shift);
unsigned int x;
+ unsigned int hgt;
+ struct gfs2_buffer_head *bh;
memset(&mh, 0, sizeof(struct gfs2_meta_header));
mh.mh_magic = GFS2_MAGIC;
@@ -214,16 +217,18 @@ static int build_quota_change(struct gfs2_inode *per_node, unsigned int j)
mh.mh_format = GFS2_FORMAT_QC;
sprintf(name, "quota_change%u", j);
- ip = createi(per_node, name, S_IFREG | 0600,
- GFS2_DIF_SYSTEM);
+ ip = createi(per_node, name, S_IFREG | 0600, GFS2_DIF_SYSTEM);
+
+ hgt = calc_tree_height(ip, (blocks + 1) * sdp->bsize);
+ build_height(ip, hgt);
for (x = 0; x < blocks; x++) {
- struct gfs2_buffer_head *bh = get_file_buf(ip, ip->i_di.di_size >> sdp->sd_sb.sb_bsize_shift, FALSE);
+ bh = get_file_buf(ip, x, FALSE);
if (!bh)
return -1;
+ memset(bh->b_data, 0, sdp->bsize);
gfs2_meta_header_out(&mh, bh);
-
brelse(bh);
}
@@ -304,8 +309,7 @@ int build_rindex(struct gfs2_sbd *sdp)
ip->i_di.di_payload_format = GFS2_FORMAT_RI;
bmodified(ip->i_bh);
- for (head = &sdp->rglist, tmp = head->next;
- tmp != head;
+ for (head = &sdp->rglist, tmp = head->next; tmp != head;
tmp = tmp->next) {
rl = osi_list_entry(tmp, struct rgrp_list, list);
diff --git a/gfs2/mkfs/main_grow.c b/gfs2/mkfs/main_grow.c
index 9e9f91a..ed3d07c 100644
--- a/gfs2/mkfs/main_grow.c
+++ b/gfs2/mkfs/main_grow.c
@@ -208,6 +208,8 @@ static void fix_rindex(struct gfs2_sbd *sdp, int rindex_fd, int old_rg_count)
gfs2_rindex_out(&rl->ri, bufptr);
bufptr += sizeof(struct gfs2_rindex);
}
+ gfs2_rgrp_free(&sdp->rglist);
+ fsync(sdp->device_fd);
if (!test) {
/* Now write the new RGs to the end of the rindex */
lseek(rindex_fd, 0, SEEK_END);
diff --git a/gfs2/mkfs/main_mkfs.c b/gfs2/mkfs/main_mkfs.c
index 306a480..80a718c 100644
--- a/gfs2/mkfs/main_mkfs.c
+++ b/gfs2/mkfs/main_mkfs.c
@@ -641,6 +641,7 @@ void main_mkfs(int argc, char *argv[])
inode_put(&sdp->md.inum);
inode_put(&sdp->md.statfs);
+ gfs2_rgrp_free(&sdp->rglist);
error = fsync(sdp->device_fd);
if (error)
die( _("can't fsync device (%d): %s\n"),
14 years, 2 months
gfs2-utils: master - GFS2: libgfs2: build_rgrps was not attaching bh's properly
by Bob Peterson
Gitweb: http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitd...
Commit: b1eca171e483b4b37cd64d78c884649471701467
Parent: 4cf278d3f53b4330d5aaed82c8d9a004fd7d319e
Author: Bob Peterson <rpeterso(a)redhat.com>
AuthorDate: Tue Feb 23 16:10:30 2010 -0600
Committer: Bob Peterson <rpeterso(a)redhat.com>
CommitterDate: Tue Feb 23 16:14:23 2010 -0600
GFS2: libgfs2: build_rgrps was not attaching bh's properly
Function build_rgrps, which is only used by mkfs.gfs2 was not
attaching buffers properly to the rgrps in memory. This patch
corrects the situation.
rhbz#455300
---
gfs2/libgfs2/fs_geometry.c | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/gfs2/libgfs2/fs_geometry.c b/gfs2/libgfs2/fs_geometry.c
index 1a297f1..82b4ff4 100644
--- a/gfs2/libgfs2/fs_geometry.c
+++ b/gfs2/libgfs2/fs_geometry.c
@@ -184,10 +184,8 @@ void build_rgrps(struct gfs2_sbd *sdp, int do_write)
struct rgrp_list *rl;
uint32_t rgblocks, bitblocks;
struct gfs2_rindex *ri;
- struct gfs2_rgrp rg;
struct gfs2_meta_header mh;
unsigned int x;
- struct gfs2_buffer_head *bh;
mh.mh_magic = GFS2_MAGIC;
mh.mh_type = GFS2_METATYPE_RB;
@@ -208,20 +206,21 @@ void build_rgrps(struct gfs2_sbd *sdp, int do_write)
ri->ri_data = rgblocks;
ri->ri_bitbytes = rgblocks / GFS2_NBBY;
- memset(&rg, 0, sizeof(rg));
- rg.rg_header.mh_magic = GFS2_MAGIC;
- rg.rg_header.mh_type = GFS2_METATYPE_RG;
- rg.rg_header.mh_format = GFS2_FORMAT_RG;
- rg.rg_free = rgblocks;
+ memset(&rl->rg, 0, sizeof(rl->rg));
+ rl->rg.rg_header.mh_magic = GFS2_MAGIC;
+ rl->rg.rg_header.mh_type = GFS2_METATYPE_RG;
+ rl->rg.rg_header.mh_format = GFS2_FORMAT_RG;
+ rl->rg.rg_free = rgblocks;
+
+ gfs2_compute_bitstructs(sdp, rl);
if (do_write) {
for (x = 0; x < bitblocks; x++) {
- bh = bget(sdp, rl->start + x);
+ rl->bh[x] = bget(sdp, rl->start + x);
if (x)
- gfs2_meta_header_out(&mh, bh);
+ gfs2_meta_header_out(&mh, rl->bh[x]);
else
- gfs2_rgrp_out(&rg, bh);
- brelse(bh);
+ gfs2_rgrp_out(&rl->rg, rl->bh[x]);
}
}
14 years, 2 months
cluster: STABLE3 - GFS2: libgfs2: build_rgrps was not attaching bh's properly
by Bob Peterson
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 953b67780ad01166f8d0fc20d57dc8ee65e6d31e
Parent: 64956e7506854d530a91aa67b404c8664328aa51
Author: Bob Peterson <rpeterso(a)redhat.com>
AuthorDate: Tue Feb 23 16:10:30 2010 -0600
Committer: Bob Peterson <rpeterso(a)redhat.com>
CommitterDate: Tue Feb 23 16:10:30 2010 -0600
GFS2: libgfs2: build_rgrps was not attaching bh's properly
Function build_rgrps, which is only used by mkfs.gfs2 was not
attaching buffers properly to the rgrps in memory. This patch
corrects the situation.
rhbz#455300
---
gfs2/libgfs2/fs_geometry.c | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/gfs2/libgfs2/fs_geometry.c b/gfs2/libgfs2/fs_geometry.c
index 3fe26fa..a06e8a2 100644
--- a/gfs2/libgfs2/fs_geometry.c
+++ b/gfs2/libgfs2/fs_geometry.c
@@ -182,10 +182,8 @@ void build_rgrps(struct gfs2_sbd *sdp, int do_write)
struct rgrp_list *rl;
uint32_t rgblocks, bitblocks;
struct gfs2_rindex *ri;
- struct gfs2_rgrp rg;
struct gfs2_meta_header mh;
unsigned int x;
- struct gfs2_buffer_head *bh;
mh.mh_magic = GFS2_MAGIC;
mh.mh_type = GFS2_METATYPE_RB;
@@ -206,20 +204,21 @@ void build_rgrps(struct gfs2_sbd *sdp, int do_write)
ri->ri_data = rgblocks;
ri->ri_bitbytes = rgblocks / GFS2_NBBY;
- memset(&rg, 0, sizeof(rg));
- rg.rg_header.mh_magic = GFS2_MAGIC;
- rg.rg_header.mh_type = GFS2_METATYPE_RG;
- rg.rg_header.mh_format = GFS2_FORMAT_RG;
- rg.rg_free = rgblocks;
+ memset(&rl->rg, 0, sizeof(rl->rg));
+ rl->rg.rg_header.mh_magic = GFS2_MAGIC;
+ rl->rg.rg_header.mh_type = GFS2_METATYPE_RG;
+ rl->rg.rg_header.mh_format = GFS2_FORMAT_RG;
+ rl->rg.rg_free = rgblocks;
+
+ gfs2_compute_bitstructs(sdp, rl);
if (do_write) {
for (x = 0; x < bitblocks; x++) {
- bh = bget(sdp, rl->start + x);
+ rl->bh[x] = bget(sdp, rl->start + x);
if (x)
- gfs2_meta_header_out(&mh, bh);
+ gfs2_meta_header_out(&mh, rl->bh[x]);
else
- gfs2_rgrp_out(&rg, bh);
- brelse(bh);
+ gfs2_rgrp_out(&rl->rg, rl->bh[x]);
}
}
14 years, 2 months
cluster: STABLE3 - build: fix publishing of tags to git
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 64956e7506854d530a91aa67b404c8664328aa51
Parent: 5c55d7d3d16caf313091daa1995a988f4c807a05
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Tue Feb 23 09:23:46 2010 +0100
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Tue Feb 23 09:23:46 2010 +0100
build: fix publishing of tags to git
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
make/release.mk | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/make/release.mk b/make/release.mk
index 5aae153..f5b1481 100644
--- a/make/release.mk
+++ b/make/release.mk
@@ -190,7 +190,7 @@ publish: sign
ifeq (,$(release))
@echo Nothing to publish
else
- @echo git push --tags origin
+ git push --tags origin
cd $(releasearea) && \
scp *.gz *.bz2 Changelog-* *sha256* \
fedorahosted.org:$(project)
14 years, 2 months
cluster: the annotated tag cluster-3.0.8 has been created
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: d67b9cf67ffbd9f538b85fbb220bfb79d7f13ace
Parent: 0000000000000000000000000000000000000000
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: 2010-02-23 04:30 +0000
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: 2010-02-23 04:30 +0000
annotated tag: cluster-3.0.8 has been created
at d67b9cf67ffbd9f538b85fbb220bfb79d7f13ace (tag)
tagging 5c55d7d3d16caf313091daa1995a988f4c807a05 (commit)
replaces cluster-3.0.7
cluster-3.0.8 release
Abhijith Das (7):
libgfs2: Bug 459630 - GFS2: changes needed to gfs2-utils due to gfs2meta fs changes in bz 457798
gfs_jadd: Bug 555363 - gfs_jadd does not resolve symbolic links
gfs2_convert: gfs2_convert should fix statfs file
mount.gfs2: Better error reporting when mounting a gfs fs without enough journals
Merge branch 'STABLE3' of ssh://git.fedoraproject.org/git/cluster into mySTABLE3
gfs-kernel: Flock on GFS fs file will error with "Resource tempory unavailable" for EWOULDBLOCK
gfs2_convert: gfs2_convert doesn't convert jdata files correctly
Bob Peterson (61):
Remove nvbuf_list and use fewer buffers
Eliminate bad_block linked block list
Simplify bitmap/block list structures
Streamline the bitmap code by always using 4-bit size per block
Misc blocklist optimizations
Separate eattr_block list from the rest for efficiency
gfs2: remove update_flags everywhere
fsck.gfs2: give comfort when processing lots of data blocks
fsck.gfs2: make query() count errors_found, errors_fixed
Attach buffers to rgrp_list structs
Make struct_out functions operate on bh's
Attach bh's to inodes
gfs2: Remove buf_lists
fsck.gfs2: Verify rgrps free space against bitmap
libgfs2: Consistent naming for blockmap functions
Move duplicate code from libgfs2 to fsck.gfs2
libgfs2, fsck.gfs2: simplify block_query code
gfs2: libgfs2 and fsck.gfs2 cleanups
libgfs2: fs_bits speed up bitmap operations
libgfs2: gfs2_log reform
fsck.gfs2: convert dup_list to a rbtree
fsck.gfs2: convert dir_info list to rbtree
fsck.gfs2: convert inode hash to rbtree
fsck.gfs2: pass1 should use gfs2_special_add not _set
libgfs2: Remove unneeded sdp parameter in gfs2_block_set
libgfs2: dir_split_leaf needs to zero out the new leaf
libgfs2: dir_split_leaf needs to check for allocation failure
libgfs2: Set block range based on rgrps, not device size
fsck.gfs2: should use the libgfs2 is_system_directory
fsck.gfs2: Journal replay should report what it's doing
fsck.gfs2: fix directories that have odd number of pointers.
libgfs2: Get rid of useless constants
fsck.gfs2: link.c should log why it's making a change for debugging
fsck.gfs2: Enforce consistent behavior in directory processing
fsck.gfs2: enforce consistency between bitmap and blockmap
fsck.gfs2: metawalk needs to check for no valid leaf blocks
fsck.gfs2: metawalk was not checking many directories
fsck.gfs2: separate check_data function in check_metatree
lost+found link count and connections were not properly managed
fsck.gfs2: reprocess lost+found and other inode metadata when blocks are added
Misc cleanups
fsck.gfs2: Check for massive amounts of pointer corruption
fsck.gfs2: use gfs2_meta_inval vs. gfs2_inval_inode
Eliminate unnecessary block_list from gfs2_edit
fsck.gfs2: rename gfs2_meta_other to gfs2_meta_rgrp.
Create a standard metadata delete interface
fsck.gfs2: cleanup: refactor pass3
fsck.gfs2: Make pass1 undo its work for unrecoverable inodes
fsck.gfs2: Overhaul duplicate reference processing
fsck.gfs2: invalidate invalid mode inodes
fsck.gfs2: Force intermediate lost+found inode updates
fsck.gfs2: Free metadata list memory we don't need
fsck.gfs2: Don't add extended attrib blocks to list twice
fsck.gfs2: small parameter passing optimization
fsck.gfs2: Free, don't invalidate, dinodes with bad depth
Misc cleanups
fsck.gfs2: If journal replay fails, give option to reinitialize journal
Fix white space errors
fsck.gfs2 fails on root fs: Device X is busy.
gfs2_edit savemeta: Don't release indirect buffers too soon
fsck.gfs2: Use fsck.ext3's method of dealing with root mounts
Christine Caulfield (4):
cman: use the typed objdb calls
cman: don't set token_retransmits_before_loss_const
cman: disable gfs plock_ownership when upgrading
config: Add schema entry for clvmd
David Teigland (15):
man pages: cluster.conf
cluster.rng: updates
man pages: fence_node, fenced
man pages: dlm_controld
cluster.rng: dlm updates
man pages: groupd
man pages: fenced
man pages: group_tool
cluster.rng: group/groupd_compat
man pages: gfs_controld
cluster.rng: gfs_controld
cluster.rng: fence, fencedevices
man pages: dlm_tool
man pages: gfs_control
dlm_controld: check all messages against enable options
Dyna Ares (1):
config: Make broadcast attr reflect documentation
Fabio M. Di Nitto (10):
release: don't build gfs-utils tarball
fence agents: man page clean up
cman init: propagate errors from fence_tool operations
gfs2: make init script LSB compliant
fence agents: fix several agents build
dlm_controld: fix linking
nss: fix linking
build: fix out-of-tree build of fence agents
release script rework
logrotate: fix logrotate default actions and set sane defaults
Jonathan E. Brassow (1):
rgmanager: halvm: Check ownership before stripping tags
Lon Hohberger (17):
config: Make nodeid attribute required
config: Make nodeid required in ldif schema
config: Fix license for value-list.[ch]
config: Sync LDIF w/ cluster.rng
rgmanager: isAlive error logging for file systems
config: Add fence_virt to cluster.rng
config: Update LDIF schema based on recent RelaxNG changes
rgmanager: Make relocate-to-offline consistent
qdisk: Fix logt_print which used to be perror()
resource-agents: SAPDatabase: remove $TEMPFILE
qdisk: Autoconfigure default timings
Revert "qdisk: Autoconfigure default timings"
rgmanager: Make VF timeout scale with token timeout
rgmanager: Clean up build warnings
qdisk: Autoconfigure default timings
qdiskd: Autoconfigure votes based on node count
qdisk: Fix uninitialized variable
Marek 'marx' Grac (2):
fencing: Add vendor URL to man pages
resource agents: Handle multiline pid files
Ryan O'Hara (2):
Remove open3 calls and replace with simple qx commands. This avoids
Always remove leading zeros from key value.
Shane Bradley (1):
resource-agents: Kill correct PIDs during force_unmount
Tatsuo Kawasaki (1):
qdisk: mkqdisk argument positioning
14 years, 2 months
cluster: STABLE3 - dlm_controld: check all messages against enable options
by David Teigland
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 5c55d7d3d16caf313091daa1995a988f4c807a05
Parent: 2f0613c0bab7022236dcbfc3ef4bb124c5f874a1
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Feb 22 11:31:30 2010 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Feb 22 11:31:30 2010 -0600
dlm_controld: check all messages against enable options
Check every plock and deadlk related message against the
enable_plock and enable_deadlk options. Log error and drop
any message for a feature that's not enabled.
Signed-off-by: David Teigland <teigland(a)redhat.com>
---
group/dlm_controld/cpg.c | 57 ++++++++++++++++++++++++++++++++++++++-------
1 files changed, 48 insertions(+), 9 deletions(-)
diff --git a/group/dlm_controld/cpg.c b/group/dlm_controld/cpg.c
index d5245ce..e01ecc2 100644
--- a/group/dlm_controld/cpg.c
+++ b/group/dlm_controld/cpg.c
@@ -1574,40 +1574,79 @@ static void deliver_cb(cpg_handle_t handle,
break;
case DLM_MSG_PLOCK:
- receive_plock(ls, hd, len);
+ if (cfgd_enable_plock)
+ receive_plock(ls, hd, len);
+ else
+ log_error("msg %d nodeid %d enable_plock %d",
+ hd->type, nodeid, cfgd_enable_plock);
break;
case DLM_MSG_PLOCK_OWN:
- receive_own(ls, hd, len);
+ if (cfgd_enable_plock && cfgd_plock_ownership)
+ receive_own(ls, hd, len);
+ else
+ log_error("msg %d nodeid %d enable_plock %d owner %d",
+ hd->type, nodeid, cfgd_enable_plock,
+ cfgd_plock_ownership);
break;
case DLM_MSG_PLOCK_DROP:
- receive_drop(ls, hd, len);
+ if (cfgd_enable_plock && cfgd_plock_ownership)
+ receive_drop(ls, hd, len);
+ else
+ log_error("msg %d nodeid %d enable_plock %d owner %d",
+ hd->type, nodeid, cfgd_enable_plock,
+ cfgd_plock_ownership);
break;
case DLM_MSG_PLOCK_SYNC_LOCK:
case DLM_MSG_PLOCK_SYNC_WAITER:
- receive_sync(ls, hd, len);
+ if (cfgd_enable_plock && cfgd_plock_ownership)
+ receive_sync(ls, hd, len);
+ else
+ log_error("msg %d nodeid %d enable_plock %d owner %d",
+ hd->type, nodeid, cfgd_enable_plock,
+ cfgd_plock_ownership);
break;
case DLM_MSG_PLOCKS_STORED:
- receive_plocks_stored(ls, hd, len);
+ if (cfgd_enable_plock)
+ receive_plocks_stored(ls, hd, len);
+ else
+ log_error("msg %d nodeid %d enable_plock %d",
+ hd->type, nodeid, cfgd_enable_plock);
break;
case DLM_MSG_DEADLK_CYCLE_START:
- receive_cycle_start(ls, hd, len);
+ if (cfgd_enable_deadlk)
+ receive_cycle_start(ls, hd, len);
+ else
+ log_error("msg %d nodeid %d enable_deadlk %d",
+ hd->type, nodeid, cfgd_enable_deadlk);
break;
case DLM_MSG_DEADLK_CYCLE_END:
- receive_cycle_end(ls, hd, len);
+ if (cfgd_enable_deadlk)
+ receive_cycle_end(ls, hd, len);
+ else
+ log_error("msg %d nodeid %d enable_deadlk %d",
+ hd->type, nodeid, cfgd_enable_deadlk);
break;
case DLM_MSG_DEADLK_CHECKPOINT_READY:
- receive_checkpoint_ready(ls, hd, len);
+ if (cfgd_enable_deadlk)
+ receive_checkpoint_ready(ls, hd, len);
+ else
+ log_error("msg %d nodeid %d enable_deadlk %d",
+ hd->type, nodeid, cfgd_enable_deadlk);
break;
case DLM_MSG_DEADLK_CANCEL_LOCK:
- receive_cancel_lock(ls, hd, len);
+ if (cfgd_enable_deadlk)
+ receive_cancel_lock(ls, hd, len);
+ else
+ log_error("msg %d nodeid %d enable_deadlk %d",
+ hd->type, nodeid, cfgd_enable_deadlk);
break;
default:
14 years, 2 months
cluster: STABLE3 - qdisk: Fix uninitialized variable
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 2f0613c0bab7022236dcbfc3ef4bb124c5f874a1
Parent: 77279c9976e222473c041f3896046f1134ee34fe
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Mon Feb 22 09:39:39 2010 -0500
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Mon Feb 22 09:42:40 2010 -0500
qdisk: Fix uninitialized variable
This prevented proper operation of qdiskd's auto vote
scheme in some cases. Suggested by Fabio Di Nitto.
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
cman/qdisk/main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cman/qdisk/main.c b/cman/qdisk/main.c
index 5d984dc..d1f29c5 100644
--- a/cman/qdisk/main.c
+++ b/cman/qdisk/main.c
@@ -1471,7 +1471,7 @@ get_dynamic_config_data(qd_ctx *ctx, int ccsfd)
static int
auto_qdisk_votes(int desc)
{
- int x, ret = 0;
+ int x = 0, ret = 0;
char buf[128];
char *name;
14 years, 2 months
cluster: STABLE3 - qdiskd: Autoconfigure votes based on node count
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 77279c9976e222473c041f3896046f1134ee34fe
Parent: 704fd5bb382ff452fc8403b9a2322e73b918619d
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Fri Feb 19 12:18:58 2010 -0500
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Fri Feb 19 12:18:58 2010 -0500
qdiskd: Autoconfigure votes based on node count
This makes qdiskd easier to use for most configurations
and does not override existing configurations.
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
cman/man/qdisk.5 | 5 +++--
cman/qdisk/main.c | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 39 insertions(+), 2 deletions(-)
diff --git a/cman/man/qdisk.5 b/cman/man/qdisk.5
index 1a74470..abd80dc 100644
--- a/cman/man/qdisk.5
+++ b/cman/man/qdisk.5
@@ -73,7 +73,7 @@ the amount of synchronous I/O contention on the shared quorum disk.
* Cluster node IDs must be statically configured in cluster.conf and
must be numbered from 1..16 (there can be gaps, of course).
-* Cluster node votes should be more or less equal.
+* Cluster node votes should all be 1.
* CMAN must be running before the qdisk program can operate in full
capacity. If CMAN is not running, qdisk will wait for it.
@@ -239,7 +239,8 @@ exceed \fBtko\fP.
\fIvotes\fP\fB="\fP3\fB"\fP
.in 12
This is the number of votes the quorum daemon advertises to CMAN when it
-has a high enough score.
+has a high enough score. The default is the number of nodes in the cluster
+minus 1. For example, in a 4 node cluster, the default is 3.
.in 9
\fIlog_level\fP\fB="\fP4\fB"\fP
diff --git a/cman/qdisk/main.c b/cman/qdisk/main.c
index 85a0563..5d984dc 100644
--- a/cman/qdisk/main.c
+++ b/cman/qdisk/main.c
@@ -1469,6 +1469,40 @@ get_dynamic_config_data(qd_ctx *ctx, int ccsfd)
static int
+auto_qdisk_votes(int desc)
+{
+ int x, ret = 0;
+ char buf[128];
+ char *name;
+
+ if (desc < 0) {
+ return 1;
+ }
+
+ while (++x) {
+ snprintf(buf, sizeof(buf)-1,
+ "/cluster/clusternodes/clusternode[%d]/@name", x);
+
+ name = NULL;
+ if (ccs_get(desc, buf, &name) != 0)
+ break;
+
+ free(name);
+ ret = x;
+ }
+
+ --ret;
+ if (ret <= 0) {
+ ret = 1;
+ }
+
+ logt_print(LOG_DEBUG, "Setting votes to %d\n", ret);
+
+ return (ret);
+}
+
+
+static int
get_static_config_data(qd_ctx *ctx, int ccsfd)
{
char *val = NULL;
@@ -1574,6 +1608,8 @@ get_static_config_data(qd_ctx *ctx, int ccsfd)
free(val);
if (ctx->qc_votes < 0)
ctx->qc_votes = 0;
+ } else {
+ ctx->qc_votes = auto_qdisk_votes(ccsfd);
}
/* Get device */
14 years, 2 months
cluster: STABLE3 - qdisk: Autoconfigure default timings
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 704fd5bb382ff452fc8403b9a2322e73b918619d
Parent: e3fdd916da5ad54e37bbc457f336fb482dbe3b14
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Fri Feb 19 09:45:17 2010 -0500
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Fri Feb 19 11:56:47 2010 -0500
qdisk: Autoconfigure default timings
Qdiskd has historically had bad default timings in STABLE3
and STABLE2. This patch makes qdiskd scale automatically
with the Totem token timeout.
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
cman/man/qdisk.5 | 30 +++++++++++++++++++++++++++---
cman/qdisk/disk.h | 2 +-
cman/qdisk/main.c | 45 ++++++++++++++++++++++++++++++++++++++++++---
3 files changed, 70 insertions(+), 7 deletions(-)
diff --git a/cman/man/qdisk.5 b/cman/man/qdisk.5
index f578e92..1a74470 100644
--- a/cman/man/qdisk.5
+++ b/cman/man/qdisk.5
@@ -80,7 +80,8 @@ capacity. If CMAN is not running, qdisk will wait for it.
* CMAN's eviction timeout should be at least 2x the quorum daemon's
to give the quorum daemon adequate time to converge on a master during a
-failure + load spike situation.
+failure + load spike situation. See section 3.3.1 for specific
+details.
* For 'all-but-one' failure operation, the total number of votes assigned
to the quorum device should be equal to or greater than the total number
@@ -211,6 +212,7 @@ This is the frequency of read/write cycles, in seconds.
\fItko\fP\fB="\fP10\fB"\fP
.in 12
This is the number of cycles a node must miss in order to be declared dead.
+The default for this number is dependent on the configured token timeout.
.in 9
\fItko_up\fP\fB="\fPX\fB"\fP
@@ -289,7 +291,7 @@ This option requires careful tuning of the CMAN timeout, the qdiskd
timeout, and CMAN's quorum_dev_poll value. As a rule of thumb,
CMAN's quorum_dev_poll value should be equal to Totem's token timeout
and qdiskd's timeout (interval*tko) should be less than half of
-Totem's token timeout.
+Totem's token timeout. See section 3.3.1 for more information.
This option only takes effect if there are no heuristics
configured. Usage of this option in configurations with more than
@@ -372,7 +374,7 @@ label. This is useful in configurations where the block device name
differs on a per-node basis.
.in 9
-\fIcman_label\fP\fB="\fPmylabel\fB"/>\fP
+\fIcman_label\fP\fB="\fPmylabel\fB"\fP
.in 12
This overrides the label advertised to CMAN if present. If specified,
the quorum daemon will register with this name instead of the actual
@@ -391,6 +393,28 @@ qdiskd is running. This option is ignored if io_timeout is set to 1.
\fB/>\fP
.in 0
+.SH "3.3.1. Quorum Disk Timings"
+Qdiskd should not be used in environments requiring failure detection
+times of less than approximately 10 seconds.
+
+Qdiskd will attempt to automatically configure timings based on the
+totem timeout and the TKO. If configuring manually, Totem's token
+timeout \fBmust\fP be set to a value at least 1 interval greater than
+the the following function:
+
+ interval * (tko + master_wait + upgrade_wait)
+
+So, if you have an interval of 2, a tko of 7, master_wait of 2 and
+upgrade_wait of 2, the token timeout should be at least 24 seconds
+(24000 msec).
+
+It is recommended to have at least 3 intervals to reduce the risk of
+quorum loss during heavy I/O load. As a rule of thumb, using a totem
+timeout more than 2x of qdiskd's timeout will result in good behavior.
+
+An improper timing configuration will cause CMAN to give up on qdiskd,
+causing a temporary loss of quorum during master transition.
+
.SH "3.2. The <heuristic> tag"
This tag is a child of the <quorumd> tag. Heuristics may not be changed
while qdiskd is running.
diff --git a/cman/qdisk/disk.h b/cman/qdisk/disk.h
index c5b3d18..8678ca7 100644
--- a/cman/qdisk/disk.h
+++ b/cman/qdisk/disk.h
@@ -246,7 +246,7 @@ typedef struct {
int qc_max_error_cycles;
int qc_master; /* Master?! */
int qc_config;
- int qc_pad;
+ int qc_token_timeout;
disk_node_state_t qc_disk_status;
disk_node_state_t qc_status;
run_flag_t qc_flags;
diff --git a/cman/qdisk/main.c b/cman/qdisk/main.c
index eb3ab3c..85a0563 100644
--- a/cman/qdisk/main.c
+++ b/cman/qdisk/main.c
@@ -24,6 +24,7 @@
#include <ccs.h>
#include <liblogthread.h>
#include "score.h"
+#include "../daemon/cman.h"
#include <sys/syslog.h>
#define LOG_DAEMON_NAME "qdiskd"
@@ -1472,6 +1473,7 @@ get_static_config_data(qd_ctx *ctx, int ccsfd)
{
char *val = NULL;
char query[256];
+ int qdisk_fo;
if (ccsfd < 0)
return -1;
@@ -1486,14 +1488,36 @@ get_static_config_data(qd_ctx *ctx, int ccsfd)
if (ctx->qc_interval < 1)
ctx->qc_interval = 1;
}
+
+ snprintf(query, sizeof(query), "/cluster/totem/@token");
+ if (ccs_get(ccsfd, query, &val) == 0) {
+ ctx->qc_token_timeout = atoi(val);
+ free(val);
+ if (ctx->qc_token_timeout < 10000) {
+ logt_print(LOG_DEBUG, "Token timeout %d is too fast "
+ "to use with qdiskd!\n",
+ ctx->qc_token_timeout);
+ }
+ } else {
+ ctx->qc_token_timeout = DEFAULT_TOKEN_TIMEOUT;
+ }
/* Get tko */
snprintf(query, sizeof(query), "/cluster/quorumd/@tko");
if (ccs_get(ccsfd, query, &val) == 0) {
ctx->qc_tko = atoi(val);
free(val);
- if (ctx->qc_tko < 3)
- ctx->qc_tko = 3;
+ } else {
+ ctx->qc_tko = ((ctx->qc_token_timeout / 1000) -
+ ctx->qc_interval) / 2;
+ logt_print(LOG_DEBUG, "Auto-configured TKO as %d based on "
+ "token=%d interval=%d\n", ctx->qc_tko,
+ ctx->qc_token_timeout, ctx->qc_interval);
+ }
+
+ if (ctx->qc_tko < 4) {
+ logt_print(LOG_ERR, "Quorum disk TKO (%d) is too low!\n",
+ ctx->qc_tko);
}
/* Get up-tko (transition off->online) */
@@ -1527,7 +1551,22 @@ get_static_config_data(qd_ctx *ctx, int ccsfd)
}
if (ctx->qc_master_wait <= ctx->qc_tko_up)
ctx->qc_master_wait = ctx->qc_tko_up + 1;
-
+
+ qdisk_fo = ctx->qc_interval * (ctx->qc_master_wait +
+ ctx->qc_upgrade_wait +
+ ctx->qc_tko) * 1000;
+ if (qdisk_fo >= ctx->qc_token_timeout) {
+ logt_print(LOG_WARNING, "Quorum disk timings are too slow for "
+ "configured token timeout\n");
+ logt_print(LOG_WARNING, " * Totem Token timeout: %dms\n",
+ ctx->qc_token_timeout);
+ logt_print(LOG_WARNING, " * Min. Master recovery time: %dms\n",
+ qdisk_fo);
+ logt_print(LOG_WARNING,
+ "Please set token timeout to at least %dms\n",
+ qdisk_fo + (ctx->qc_interval * 1000));
+ }
+
/* Get votes */
snprintf(query, sizeof(query), "/cluster/quorumd/@votes");
if (ccs_get(ccsfd, query, &val) == 0) {
14 years, 2 months