cluster: RHEL6 - ccs_tool: Fix example fence device in "ccs_tool create" help
by Christine Caulfield
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=32d27530633...
Commit: 32d27530633334b6ca8a8d01a3f555043f6b13f9
Parent: 7b95790fe6139c62552580a044ec02a3a5b9d0a2
Author: Christine Caulfield <ccaulfie(a)redhat.com>
AuthorDate: Fri Jul 19 11:17:25 2013 +0100
Committer: Christine Caulfield <ccaulfie(a)redhat.com>
CommitterDate: Fri Jul 19 11:17:25 2013 +0100
ccs_tool: Fix example fence device in "ccs_tool create" help
Although creating fence devices using ccs_tool is not supported
in RHEL6, the help should at least show a valid configuration.
This patch is an amalgamated copy from the STABLE32 branch and
Resolves: rhbz#871603
Signed-off-by: Christine Caulfield <ccaulfie(a)redhat.com>
---
config/tools/ccs_tool/editconf.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/config/tools/ccs_tool/editconf.c b/config/tools/ccs_tool/editconf.c
index 7971672..34f7893 100644
--- a/config/tools/ccs_tool/editconf.c
+++ b/config/tools/ccs_tool/editconf.c
@@ -77,7 +77,7 @@ static void create_usage(const char *name)
"\n"
"eg:\n"
" ccs_tool create MyCluster\n"
- " ccs_tool addfence apc fence_apc ipaddr=apc.domain.net user=apc password=apc\n"
+ " ccs_tool addfence apc fence_apc ipaddr=apc.domain.net login=apc passwd=apc\n"
" ccs_tool addnode node1 -n 1 -f apc port=1\n"
" ccs_tool addnode node2 -n 2 -f apc port=2\n"
" ccs_tool addnode node3 -n 3 -f apc port=3\n"
@@ -144,7 +144,7 @@ static void addnode_usage(const char *name)
fprintf(stderr, " -n --nodeid Nodeid (required)\n");
fprintf(stderr, " -v --votes Number of votes for this node (default 1)\n");
fprintf(stderr, " -a --altname Alternative name/interface for multihomed hosts\n");
- fprintf(stderr, " -f --fence_type Type of fencing to use\n");
+ fprintf(stderr, " -f --fence_type Name reference of fencing to use\n");
config_usage(1);
help_usage();
@@ -152,10 +152,10 @@ static void addnode_usage(const char *name)
fprintf(stderr, "Examples:\n");
fprintf(stderr, "\n");
fprintf(stderr, "Add a new node to default configuration file:\n");
- fprintf(stderr, " %s %s newnode1 -n 1 -f manual ipaddr=newnode\n", prog_name, name);
+ fprintf(stderr, " %s %s newnode1 -n 1 -f wti7 port=1\n", prog_name, name);
fprintf(stderr, "\n");
fprintf(stderr, "Add a new node and dump config file to stdout rather than save it\n");
- fprintf(stderr, " %s %s newnode2 -n 2 -f apc -o- newnode.temp.net port=1\n", prog_name, name);
+ fprintf(stderr, " %s %s -o- newnode2 -n 2 -f apc port=1\n", prog_name, name);
exit(0);
}
10 years, 9 months
cluster: RHEL6 - fsck.gfs2: Don't rely on cluster.conf when rebuilding sb
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=7b95790fe61...
Commit: 7b95790fe6139c62552580a044ec02a3a5b9d0a2
Parent: 000c4f23ace255893a5e7efa0ce788d4d2f1a23d
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Wed Jul 17 12:36:40 2013 +0100
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Thu Jul 18 16:36:35 2013 +0100
fsck.gfs2: Don't rely on cluster.conf when rebuilding sb
As cluster.conf no longer exists we can't sniff the locking options from
it when rebuilding the superblock and in any case we shouldn't assume
that fsck.gfs2 is running on the cluster the volume belongs to.
This patch removes the get_lockproto_table function and instead sets the
lock table name to a placeholder ("unknown") and sets lockproto to
"lock_dlm". It warns the user at the end of the run that the locktable
will need to be set before mounting.
Resolves: rhbz#985796
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/fsck/initialize.c | 57 +++--------------------------------------------
gfs2/fsck/main.c | 4 +++
2 files changed, 8 insertions(+), 53 deletions(-)
diff --git a/gfs2/fsck/initialize.c b/gfs2/fsck/initialize.c
index 0676426..789af2c 100644
--- a/gfs2/fsck/initialize.c
+++ b/gfs2/fsck/initialize.c
@@ -31,6 +31,7 @@ static int was_mounted_ro = 0;
static uint64_t possible_root = HIGHEST_BLOCK;
static struct master_dir fix_md;
static unsigned long long blks_2free = 0;
+extern int sb_fixed;
/**
* block_mounters
@@ -812,58 +813,6 @@ static int init_system_inodes(struct gfs2_sbd *sdp)
return -1;
}
-static int get_lockproto_table(struct gfs2_sbd *sdp)
-{
- FILE *fp;
- char line[PATH_MAX];
- char *cluname, *end;
- const char *fsname, *cfgfile = "/etc/cluster/cluster.conf";
-
- memset(sdp->lockproto, 0, sizeof(sdp->lockproto));
- memset(sdp->locktable, 0, sizeof(sdp->locktable));
- fp = fopen(cfgfile, "rt");
- if (!fp) {
- /* no cluster.conf; must be a stand-alone file system */
- strcpy(sdp->lockproto, "lock_nolock");
- log_warn(_("Lock protocol determined to be: lock_nolock\n"));
- log_warn(_("Stand-alone file system: No need for a lock "
- "table.\n"));
- return 0;
- }
- /* We found a cluster.conf so assume it's a clustered file system */
- log_warn(_("Lock protocol assumed to be: " GFS2_DEFAULT_LOCKPROTO
- "\n"));
- strcpy(sdp->lockproto, GFS2_DEFAULT_LOCKPROTO);
-
- while (fgets(line, sizeof(line) - 1, fp)) {
- cluname = strstr(line,"<cluster name=");
- if (cluname) {
- cluname += 15;
- end = strchr(cluname,'"');
- if (end)
- *end = '\0';
- break;
- }
- }
- if (cluname == NULL || end == NULL || end - cluname < 1) {
- log_err(_("Error: Unable to determine cluster name from %s\n"),
- cfgfile);
- } else {
- fsname = strrchr(opts.device, '/');
- if (fsname)
- fsname++;
- else
- fsname = "repaired";
- snprintf(sdp->locktable, sizeof(sdp->locktable), "%.*s:%.16s",
- (int)(sizeof(sdp->locktable) - strlen(fsname) - 2),
- cluname, fsname);
- log_warn(_("Lock table determined to be: %s\n"),
- sdp->locktable);
- }
- fclose(fp);
- return 0;
-}
-
/**
* is_journal_copy - Is this a "real" dinode or a copy inside a journal?
* A real dinode will be located at the block number in its no_addr.
@@ -1234,7 +1183,8 @@ static int sb_repair(struct gfs2_sbd *sdp)
}
}
/* Step 3 - Rebuild the lock protocol and file system table name */
- get_lockproto_table(sdp);
+ strcpy(sdp->lockproto, GFS2_DEFAULT_LOCKPROTO);
+ strcpy(sdp->locktable, "unknown");
if (query(_("Okay to fix the GFS2 superblock? (y/n)"))) {
log_info(_("Found system master directory at: 0x%llx\n"),
sdp->sd_sb.sb_master_dir.no_addr);
@@ -1250,6 +1200,7 @@ static int sb_repair(struct gfs2_sbd *sdp)
build_sb(sdp, uuid);
inode_put(&sdp->md.rooti);
inode_put(&sdp->master_dir);
+ sb_fixed = 1;
} else {
log_crit(_("GFS2 superblock not fixed; fsck cannot proceed "
"without a valid superblock.\n"));
diff --git a/gfs2/fsck/main.c b/gfs2/fsck/main.c
index ecf384f..5259bae 100644
--- a/gfs2/fsck/main.c
+++ b/gfs2/fsck/main.c
@@ -35,6 +35,7 @@ struct osi_root dirtree = (struct osi_root) { NULL, };
struct osi_root inodetree = (struct osi_root) { NULL, };
int dups_found = 0, dups_found_first = 0;
struct gfs_sb *sbd1 = NULL;
+int sb_fixed = 0;
extern FILE *brdfp;
@@ -371,6 +372,9 @@ int main(int argc, char **argv)
log_notice( _("Writing changes to disk\n"));
fsync(sdp->device_fd);
destroy(sdp);
+ if (sb_fixed)
+ log_warn(_("Superblock was reset. Use tunegfs2 to manually "
+ "set lock table before mounting.\n"));
log_notice( _("gfs2_fsck complete\n"));
if (!error) {
10 years, 9 months
cluster: RHEL6 - fsck.gfs2: Detect and fix duplicate references in hash tables
by Bob Peterson
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=000c4f23ace...
Commit: 000c4f23ace255893a5e7efa0ce788d4d2f1a23d
Parent: 6e8aeb238f96b77b85c2601809f23e2cc898d1ff
Author: Bob Peterson <rpeterso(a)redhat.com>
AuthorDate: Mon Jul 15 14:32:20 2013 -0500
Committer: Bob Peterson <rpeterso(a)redhat.com>
CommitterDate: Thu Jul 18 07:45:07 2013 -0500
fsck.gfs2: Detect and fix duplicate references in hash tables
This patch checks directory hash tables for multiple occurrences
of the same leaf block. When duplicates are encountered, it checks
to see which reference is appropriate for the hash table location
based on the leaf block's hash value. The appropriate reference is
kept and all duplicates are replaced by newly created leaf blocks.
rhbz#984085
---
gfs2/fsck/pass2.c | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 106 insertions(+), 0 deletions(-)
diff --git a/gfs2/fsck/pass2.c b/gfs2/fsck/pass2.c
index 4bbaadb..ba5a71d 100644
--- a/gfs2/fsck/pass2.c
+++ b/gfs2/fsck/pass2.c
@@ -1276,6 +1276,108 @@ static int fix_hashtable(struct gfs2_inode *ip, uint64_t *tbl, unsigned hsize,
return changes;
}
+/* check_hash_tbl_dups - check for the same leaf in multiple places */
+static int check_hash_tbl_dups(struct gfs2_inode *ip, uint64_t *tbl,
+ unsigned hsize, int lindex, int len)
+{
+ int l, len2;
+ uint64_t leafblk, leaf_no;
+ struct gfs2_buffer_head *lbh;
+ struct gfs2_leaf leaf;
+ struct gfs2_dirent dentry, *de;
+ int hash_index; /* index into the hash table based on the hash */
+
+ leafblk = be64_to_cpu(tbl[lindex]);
+ for (l = 0; l < hsize; l++) {
+ if (l == lindex) { /* skip the valid reference */
+ l += len - 1;
+ continue;
+ }
+ if (be64_to_cpu(tbl[l]) != leafblk)
+ continue;
+
+ for (len2 = 0; l + len2 < hsize; len2++) {
+ if (l + len2 == lindex)
+ break;
+ if (be64_to_cpu(tbl[l + len2]) != leafblk)
+ break;
+ }
+ log_err(_("Dinode %llu (0x%llx) has duplicate leaf pointers "
+ "to block %llu (0x%llx) at offsets %u (0x%x) "
+ "(for 0x%x) and %u (0x%x) (for 0x%x)\n"),
+ (unsigned long long)ip->i_di.di_num.no_addr,
+ (unsigned long long)ip->i_di.di_num.no_addr,
+ (unsigned long long)leafblk,
+ (unsigned long long)leafblk, lindex, lindex, len,
+ l, l, len2);
+
+ /* See which set of references is valid: the one passed in
+ or the duplicate we found. */
+ memset(&leaf, 0, sizeof(leaf));
+ leaf_no = leafblk;
+ if (!valid_block(ip->i_sbd, leaf_no)) /* Checked later */
+ continue;
+
+ lbh = bread(ip->i_sbd, leafblk);
+ if (gfs2_check_meta(lbh, GFS2_METATYPE_LF)) { /* Chked later */
+ brelse(lbh);
+ continue;
+ }
+
+ memset(&dentry, 0, sizeof(struct gfs2_dirent));
+ de = (struct gfs2_dirent *)(lbh->b_data +
+ sizeof(struct gfs2_leaf));
+ gfs2_dirent_in(&dentry, (char *)de);
+ hash_index = hash_table_index(dentry.de_hash, ip);
+ brelse(lbh);
+ /* check the duplicate ref first */
+ if (hash_index < l || hash_index > l + len2) {
+ log_err(_("This leaf block has hash index %d, which "
+ "is out of bounds for lindex (%d - %d)\n"),
+ hash_index, l, l + len2);
+ if (!query( _("Fix the hash table? (y/n) "))) {
+ log_err(_("Hash table not fixed.\n"));
+ return 0;
+ }
+ /* Adjust the ondisk block count. The original value
+ may have been correct without the duplicates but
+ pass1 would have counted them and adjusted the
+ count to include them. So we must subtract them. */
+ ip->i_di.di_blocks--;
+ bmodified(ip->i_bh);
+ pad_with_leafblks(ip, tbl, l, len2);
+ } else {
+ log_debug(_("Hash index 0x%x is the proper "
+ "reference to leaf 0x%llx.\n"),
+ l, (unsigned long long)leafblk);
+ }
+ /* Check the original ref: both references might be bad.
+ If both were bad, just return and if we encounter it
+ again, we'll treat it as new. If the original ref is not
+ bad, keep looking for (and fixing) other instances. */
+ if (hash_index < lindex || hash_index > lindex + len) {
+ log_err(_("This leaf block has hash index %d, which "
+ "is out of bounds for lindex (%d - %d).\n"),
+ hash_index, lindex, lindex + len);
+ if (!query( _("Fix the hash table? (y/n) "))) {
+ log_err(_("Hash table not fixed.\n"));
+ return 0;
+ }
+ ip->i_di.di_blocks--;
+ bmodified(ip->i_bh);
+ pad_with_leafblks(ip, tbl, lindex, len);
+ /* At this point we know both copies are bad, so we
+ return to start fresh */
+ return -EFAULT;
+ } else {
+ log_debug(_("Hash index 0x%x is the proper "
+ "reference to leaf 0x%llx.\n"),
+ lindex, (unsigned long long)leafblk);
+ }
+ }
+ return 0;
+}
+
/* check_hash_tbl - check that the hash table is sane
*
* We've got to make sure the hash table is sane. Each leaf needs to
@@ -1370,6 +1472,10 @@ static int check_hash_tbl(struct gfs2_inode *ip, uint64_t *tbl,
lindex += proper_len;
continue;
}
+
+ if (check_hash_tbl_dups(ip, tbl, hsize, lindex, len))
+ continue;
+
/* Make sure they call on proper leaf-split boundaries. This
is the calculation used by the kernel, and dir_split_leaf */
proper_start = (lindex & ~(proper_len - 1));
10 years, 9 months
cluster: RHEL6 - fsck.gfs2: avoid negative number in leaf depth
by Bob Peterson
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=6e8aeb238f9...
Commit: 6e8aeb238f96b77b85c2601809f23e2cc898d1ff
Parent: e56cd5e56f21f4b9ee6c383cc5beaac54c4f60b4
Author: Bob Peterson <rpeterso(a)redhat.com>
AuthorDate: Mon Jul 15 14:25:43 2013 -0500
Committer: Bob Peterson <rpeterso(a)redhat.com>
CommitterDate: Thu Jul 18 07:45:06 2013 -0500
fsck.gfs2: avoid negative number in leaf depth
If a leaf block appears many times by mistake in the same hash table,
there's a chance it belongs in a different directory's hash table, and
was put there by mistake. In that case, the leaf depth may be too
big for the directory in which it improperly appears. When that happens,
function check_leaf_depth can come up with a negative number when it
calculates the depth. This patch prevents the negative leaf depth error
by flagging an error when it determines the leaf depth is wrong.
The error causes pass2 to relocate the leaf to lost+found when it returns.
rhbz#984085
---
gfs2/fsck/pass2.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/gfs2/fsck/pass2.c b/gfs2/fsck/pass2.c
index c243a5a..4bbaadb 100644
--- a/gfs2/fsck/pass2.c
+++ b/gfs2/fsck/pass2.c
@@ -274,6 +274,9 @@ static int check_leaf_depth(struct gfs2_inode *ip, uint64_t leaf_no,
factor++;
divisor >>= 1;
}
+ if (ip->i_di.di_depth < factor) /* can't be fixed--leaf must be on the
+ wrong dinode. */
+ return -1;
correct_depth = ip->i_di.di_depth - factor;
if (cur_depth == correct_depth)
return 0;
10 years, 9 months
cluster: RHEL6 - fsck.gfs2: don't check newly created lost+found in pass2
by Bob Peterson
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=e56cd5e56f2...
Commit: e56cd5e56f21f4b9ee6c383cc5beaac54c4f60b4
Parent: 1fe763e8bf06428a75b9c2be71b8e1d1d0b5ad47
Author: Bob Peterson <rpeterso(a)redhat.com>
AuthorDate: Mon Jul 15 14:11:34 2013 -0500
Committer: Bob Peterson <rpeterso(a)redhat.com>
CommitterDate: Thu Jul 18 07:45:06 2013 -0500
fsck.gfs2: don't check newly created lost+found in pass2
This patch checks whether lost+found was created during the run
and if so, it skips pass2 directory checking for lost+found.
The reason we need to do this is because when lost+found is created,
it sets the directory linkage count to 1. If pass2 checks the
directory, it will add it a second time because it checks it like
every other normal directory. Therefore, the linkage counts get off.
Plus, it's a waste of time to check it, since we just built it.
rhbz#984085
---
gfs2/fsck/fsck.h | 1 +
gfs2/fsck/lost_n_found.c | 1 +
gfs2/fsck/main.c | 1 +
gfs2/fsck/pass2.c | 8 ++++++++
4 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/gfs2/fsck/fsck.h b/gfs2/fsck/fsck.h
index cc86268..ddabf79 100644
--- a/gfs2/fsck/fsck.h
+++ b/gfs2/fsck/fsck.h
@@ -124,6 +124,7 @@ struct dir_info *dirtree_insert(struct gfs2_inum inum);
extern struct gfs2_options opts;
extern struct gfs2_inode *lf_dip; /* Lost and found directory inode */
+extern int lf_was_created;
extern struct gfs2_bmap *bl;
extern uint64_t last_fs_block, last_reported_block;
extern int64_t last_reported_fblock;
diff --git a/gfs2/fsck/lost_n_found.c b/gfs2/fsck/lost_n_found.c
index 388787d..c8265a2 100644
--- a/gfs2/fsck/lost_n_found.c
+++ b/gfs2/fsck/lost_n_found.c
@@ -130,6 +130,7 @@ void make_sure_lf_exists(struct gfs2_inode *ip)
q = block_type(lf_dip->i_di.di_num.no_addr);
if (q != gfs2_inode_dir) {
+ lf_was_created = 1;
/* This is a new lost+found directory, so set its block type
and increment link counts for the directories */
/* FIXME: i'd feel better about this if fs_mkdir returned
diff --git a/gfs2/fsck/main.c b/gfs2/fsck/main.c
index ec44c83..ecf384f 100644
--- a/gfs2/fsck/main.c
+++ b/gfs2/fsck/main.c
@@ -20,6 +20,7 @@
struct gfs2_options opts = {0};
struct gfs2_inode *lf_dip = NULL; /* Lost and found directory inode */
+int lf_was_created = 0;
struct gfs2_bmap *bl = NULL;
uint64_t last_fs_block, last_reported_block = -1;
int64_t last_reported_fblock = -1000000;
diff --git a/gfs2/fsck/pass2.c b/gfs2/fsck/pass2.c
index 78bc34b..c243a5a 100644
--- a/gfs2/fsck/pass2.c
+++ b/gfs2/fsck/pass2.c
@@ -1676,6 +1676,14 @@ int pass2(struct gfs2_sbd *sdp)
if (q != gfs2_inode_dir)
continue;
+ /* If we created lost+found, its links should have been
+ properly adjusted, so don't check it. */
+ if (lf_was_created &&
+ (dirblk == lf_dip->i_di.di_num.no_addr)) {
+ log_debug(_("Pass2 skipping the new lost+found.\n"));
+ continue;
+ }
+
log_debug( _("Checking directory inode at block %llu (0x%llx)\n"),
(unsigned long long)dirblk, (unsigned long long)dirblk);
10 years, 9 months
cluster: RHEL6 - fsck.gfs2: Fix infinite loop in pass1b caused by duplicates in hash table
by Bob Peterson
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=1fe763e8bf0...
Commit: 1fe763e8bf06428a75b9c2be71b8e1d1d0b5ad47
Parent: 0aba0e8625b7c36ba355fb250090d37d9a2f079f
Author: Bob Peterson <rpeterso(a)redhat.com>
AuthorDate: Mon Jul 15 14:01:16 2013 -0500
Committer: Bob Peterson <rpeterso(a)redhat.com>
CommitterDate: Thu Jul 18 07:45:06 2013 -0500
fsck.gfs2: Fix infinite loop in pass1b caused by duplicates in hash table
If directory leaf blocks appeared more than once in a directory hash
table, the duplicate references would be flagged as a duplicate,
but since the duplicates were all from the same directory dinode,
pass1b would not realize it needed to stop. This patch changes the
criteria for duplicate processing so that it stops when the references
are down to a single dinode, not a single reference. This allows
it to get beyond pass1b so that the problem can be fixed by the hash
table checking code in pass2.
rhbz#984085
---
gfs2/fsck/pass1b.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gfs2/fsck/pass1b.c b/gfs2/fsck/pass1b.c
index e15d6b2..401ee80 100644
--- a/gfs2/fsck/pass1b.c
+++ b/gfs2/fsck/pass1b.c
@@ -366,11 +366,11 @@ static int handle_dup_blk(struct gfs2_sbd *sdp, struct duptree *dt)
/* If there's still a last remaining reference, and it's a valid
reference, use it to determine the correct block type for our
blockmap and bitmap. */
- if (dh.ref_count == 1 && !osi_list_empty(&dt->ref_inode_list)) {
+ if (dh.ref_inode_count == 1 && !osi_list_empty(&dt->ref_inode_list)) {
uint8_t q;
log_notice( _("Block %llu (0x%llx) has only one remaining "
- "valid reference.\n"),
+ "valid inode referencing it.\n"),
(unsigned long long)dup_blk,
(unsigned long long)dup_blk);
/* If we're down to a single reference (and not all references
10 years, 9 months
cluster: RHEL6 - fsck.gfs2: Fix directory link on relocated directory dirents
by Bob Peterson
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=0aba0e8625b...
Commit: 0aba0e8625b7c36ba355fb250090d37d9a2f079f
Parent: a0d660b55db19beac73840aa4e43457737e07e11
Author: Bob Peterson <rpeterso(a)redhat.com>
AuthorDate: Mon Jul 15 13:50:21 2013 -0500
Committer: Bob Peterson <rpeterso(a)redhat.com>
CommitterDate: Thu Jul 18 07:45:06 2013 -0500
fsck.gfs2: Fix directory link on relocated directory dirents
There was a problem whereby fsck.gfs2 would discover a directory entry
that's on the wrong leaf block (the dirent's hash value doesn't fit
the acceptable range for that leaf block). In that case, fsck would
relocate the dirent to an appropriate leaf block. The problem is, if
that dirent was for a directory, the directory link count was adjusted
appropriately, but it was not properly added to the directory linkage
due to the fact that it took an error path in order to delete the
dirent that was relocated. This resulted in a problem when pass3 went
to verify the directory linkage. Despite the intact directory linkage,
it flagged the directory as not linked, then it improperly added it
to lost+found. Subsequent fsck.gfs2 would discover the double-linkage
problems.
rhbz#984085
---
gfs2/fsck/pass2.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/gfs2/fsck/pass2.c b/gfs2/fsck/pass2.c
index a9ccac1..78bc34b 100644
--- a/gfs2/fsck/pass2.c
+++ b/gfs2/fsck/pass2.c
@@ -389,7 +389,18 @@ static int wrong_leaf(struct gfs2_inode *ip, struct gfs2_inum *entry,
leaf, but that leaf has already been processed. So we have
to nuke the dent from this leaf when we return, but we
still need to do the "good dent" accounting. */
- error = incr_link_count(*entry, ip, _("valid reference"));
+ if (de->de_type == (sdp->gfs1 ? GFS_FILE_DIR : DT_DIR)) {
+ error = set_parent_dir(sdp, de->de_inum,
+ ip->i_di.di_num);
+ if (error > 0)
+ /* This is a bit of a kludge, but returning 0
+ in this case causes the caller to go through
+ function set_parent_dir a second time and
+ deal properly with the hard link. */
+ return 0;
+ }
+ error = incr_link_count(*entry, ip,
+ _("moved valid reference"));
if (error > 0 &&
bad_formal_ino(ip, dent, *entry, tmp_name, q, de, bh) == 1)
return 1; /* nuke it */
10 years, 9 months
cluster: RHEL6 - fsck.gfs2: fix some log messages
by Bob Peterson
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=a0d660b55db...
Commit: a0d660b55db19beac73840aa4e43457737e07e11
Parent: e1aee22c3853cb218e351c73d44448722a805d68
Author: Bob Peterson <rpeterso(a)redhat.com>
AuthorDate: Mon Jul 15 13:43:43 2013 -0500
Committer: Bob Peterson <rpeterso(a)redhat.com>
CommitterDate: Thu Jul 18 07:45:06 2013 -0500
fsck.gfs2: fix some log messages
This patch fixes two messages: First, there's a place where it was
supposed to print a value in hexadecimal, but it printed in decimal.
Second, there's a place where it failed to print a newline.
rhbz#984085
---
gfs2/fsck/pass2.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gfs2/fsck/pass2.c b/gfs2/fsck/pass2.c
index 4b3efd9..a9ccac1 100644
--- a/gfs2/fsck/pass2.c
+++ b/gfs2/fsck/pass2.c
@@ -1421,7 +1421,7 @@ static int check_hash_tbl(struct gfs2_inode *ip, uint64_t *tbl,
continue;
log_err(_("Dinode %llu (0x%llx) has a hash table "
- "inconsistency at index %d (0x%d) for %d\n"),
+ "inconsistency at index %d (0x%x) for %d\n"),
(unsigned long long)ip->i_di.di_num.no_addr,
(unsigned long long)ip->i_di.di_num.no_addr,
i, i, len);
@@ -1440,7 +1440,7 @@ static int check_hash_tbl(struct gfs2_inode *ip, uint64_t *tbl,
proper_len = 1 << (ip->i_di.di_depth - leaf.lf_depth);
if (proper_len != len) {
log_debug(_("Length 0x%x is not proper for "
- "leaf %llu (0x%llx): 0x%x"),
+ "leaf %llu (0x%llx): 0x%x\n"),
len, (unsigned long long)leafblk,
(unsigned long long)leafblk,
proper_len);
10 years, 9 months
fence-agents: RHEL6 - fence_ipmilan: Better description of lanplus parameter
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=1298b5...
Commit: 1298b59b0e8adc965d4aa273b19779685b5a6561
Parent: 88ee1bcc4dc0cf16b4144cbce4585ee4b852691c
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Thu Jul 18 12:04:01 2013 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Thu Jul 18 12:19:47 2013 +0200
fence_ipmilan: Better description of lanplus parameter
resolves: rhbz#981086
---
fence/agents/ipmilan/ipmilan.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fence/agents/ipmilan/ipmilan.c b/fence/agents/ipmilan/ipmilan.c
index 4d286ea..3561456 100644
--- a/fence/agents/ipmilan/ipmilan.c
+++ b/fence/agents/ipmilan/ipmilan.c
@@ -167,7 +167,7 @@ struct xml_parameter_s xml_parameters[]={
{"ipaddr","-a",1,"string",NULL,"IPMI Lan IP to talk to"},
{"passwd","-p",0,"string",NULL,"Password (if required) to control power on IPMI device"},
{"passwd_script","-S",0,"string",NULL,"Script to retrieve password (if required)"},
- {"lanplus","-P",0,"boolean",NULL,"Use Lanplus"},
+ {"lanplus","-P",0,"boolean",NULL,"Use Lanplus to improve security of connection"},
{"login","-l",0,"string",NULL,"Username/Login (if required) to control power on IPMI device"},
{"action","-o",0,"string","reboot","Operation to perform. Valid operations: on, off, reboot, status, list, diag, monitor or metadata"},
{"timeout","-t",0,"string",NULL,"Timeout (sec) for IPMI operation"},
@@ -859,7 +859,7 @@ printf(" -a <ipaddr> IPMI Lan IP to talk to\n");
printf(" -i <ipaddr> IPMI Lan IP to talk to (deprecated, use -a)\n");
printf(" -p <password> Password (if required) to control power on\n"
" IPMI device\n");
-printf(" -P Use Lanplus\n");
+printf(" -P Use Lanplus to improve security of connection\n");
printf(" -S <path> Script to retrieve password (if required)\n");
printf(" -l <login> Username/Login (if required) to control power\n"
" on IPMI device\n");
10 years, 9 months
fence-agents: master - fence_ipmilan: Better description of lanplus parameter
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=7117a5...
Commit: 7117a54a55aafb9f6ea97fe7b3a7b56355f609e4
Parent: c61430f65c843c4e4b7b3487f378d306efe1d52a
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Thu Jul 18 12:04:01 2013 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Thu Jul 18 12:04:01 2013 +0200
fence_ipmilan: Better description of lanplus parameter
resolves: rhbz#981086
---
fence/agents/ipmilan/ipmilan.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fence/agents/ipmilan/ipmilan.c b/fence/agents/ipmilan/ipmilan.c
index 4d286ea..3561456 100644
--- a/fence/agents/ipmilan/ipmilan.c
+++ b/fence/agents/ipmilan/ipmilan.c
@@ -167,7 +167,7 @@ struct xml_parameter_s xml_parameters[]={
{"ipaddr","-a",1,"string",NULL,"IPMI Lan IP to talk to"},
{"passwd","-p",0,"string",NULL,"Password (if required) to control power on IPMI device"},
{"passwd_script","-S",0,"string",NULL,"Script to retrieve password (if required)"},
- {"lanplus","-P",0,"boolean",NULL,"Use Lanplus"},
+ {"lanplus","-P",0,"boolean",NULL,"Use Lanplus to improve security of connection"},
{"login","-l",0,"string",NULL,"Username/Login (if required) to control power on IPMI device"},
{"action","-o",0,"string","reboot","Operation to perform. Valid operations: on, off, reboot, status, list, diag, monitor or metadata"},
{"timeout","-t",0,"string",NULL,"Timeout (sec) for IPMI operation"},
@@ -859,7 +859,7 @@ printf(" -a <ipaddr> IPMI Lan IP to talk to\n");
printf(" -i <ipaddr> IPMI Lan IP to talk to (deprecated, use -a)\n");
printf(" -p <password> Password (if required) to control power on\n"
" IPMI device\n");
-printf(" -P Use Lanplus\n");
+printf(" -P Use Lanplus to improve security of connection\n");
printf(" -S <path> Script to retrieve password (if required)\n");
printf(" -l <login> Username/Login (if required) to control power\n"
" on IPMI device\n");
10 years, 9 months