[Cluster-devel] Cluster Project branch, master, updated. cluster-2.99.06-72-g402bbde
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=402bbded982537fcae1eaec968a03e434a37591d The branch, master has been updated via 402bbded982537fcae1eaec968a03e434a37591d (commit) via ba2c24b6dc64e7b20568b39bcf8f2556b8addb8e (commit) from 37f6d47cb10977b33267a449e22a755e27164c35 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 402bbded982537fcae1eaec968a03e434a37591d Author: Bob Peterson [EMAIL PROTECTED] Date: Fri Jul 25 08:48:50 2008 -0500 gfs2_edit: was parsing out gfs1 log descriptors improperly GFS2 log descriptors have 8 bytes per entry which represents a block number. GFS1 log descriptors have a small structure that is 16-bytes, the first 8 bytes of which is the block. So gfs2_edit was mistaking the extra 0x for a GFS2 end-of-block marker when it shouldn't have. This fixes it. commit ba2c24b6dc64e7b20568b39bcf8f2556b8addb8e Author: Bob Peterson [EMAIL PROTECTED] Date: Fri Jul 25 08:17:12 2008 -0500 gfs2_edit: Ability to enter journalX in block number. With gfs2_edit, you can position to the block # field and press enter, then enter a block number to jump to. You may also enter a keyword, like root to jump to the root directory, rindex to jump to the rindex, etc. Most keywords worked, but you could not enter journal0 to jump to the first journal until this fix made it possible. --- Summary of changes: gfs2/edit/hexedit.c | 120 +-- 1 files changed, 78 insertions(+), 42 deletions(-) diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c index 15e1f58..78de17f 100644 --- a/gfs2/edit/hexedit.c +++ b/gfs2/edit/hexedit.c @@ -147,6 +147,7 @@ int bobgets(char string[],int x,int y,int sz,int *ch) case('\r'): rc=1; done=TRUE; + string[runningy-y] = '\0'; break; case(KEY_CANCEL): case(0x01B): @@ -1628,6 +1629,60 @@ uint64_t pop_block(void) } /* */ +/* find_journal_block - figure out where a journal starts, given the name */ +/* Returns: journal block number, changes j_size to the journal size*/ +/* */ +uint64_t find_journal_block(const char *journal, uint64_t *j_size) +{ + int journal_num; + uint64_t jindex_block, jblock = 0; + int amtread; + struct gfs2_buffer_head *jindex_bh, *j_bh; + char jbuf[sbd.bsize]; + struct gfs2_inode *j_inode = NULL; + + journal_num = atoi(journal + 7); + /* Figure out the block of the jindex file */ + if (gfs1) + jindex_block = sbd1-sb_jindex_di.no_addr; + else + jindex_block = masterblock(jindex); + /* read in the block */ + jindex_bh = bread(sbd, jindex_block); + /* get the dinode data from it. */ + gfs2_dinode_in(di, jindex_bh-b_data); /* parse disk inode to struct*/ + + if (!gfs1) + do_dinode_extended(di, jindex_bh-b_data); /* parse dir. */ + brelse(jindex_bh, not_updated); + + if (gfs1) { + struct gfs2_inode *jiinode; + struct gfs_jindex ji; + + jiinode = inode_get(sbd, jindex_bh); + amtread = gfs2_readi(jiinode, (void *)jbuf, + journal_num * sizeof(struct gfs_jindex), + sizeof(struct gfs_jindex)); + if (amtread) { + gfs_jindex_in(ji, jbuf); + jblock = ji.ji_addr; + *j_size = ji.ji_nsegment * 0x10; + } + } else { + struct gfs2_dinode jdi; + + jblock = indirect-ii[0].dirent[journal_num + 2].block; + j_bh = bread(sbd, jblock); + j_inode = inode_get(sbd, j_bh); + gfs2_dinode_in(jdi, j_bh-b_data);/* parse dinode to struct */ + *j_size = jdi.di_size; + brelse(j_bh, not_updated); + } + return jblock; +} + +/* */ /* Check if the word is a keyword such as sb or rindex */ /* Returns: block number if it is, else 0 */ /*
[Cluster-devel] Cluster Project branch, STABLE2, updated. cluster-2.03.05-23-g8ac81e0
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=8ac81e012926ef4b9466f8b19cf161f0a7d04838 The branch, STABLE2 has been updated via 8ac81e012926ef4b9466f8b19cf161f0a7d04838 (commit) via e9a3bcc3a70f9da48e1c5dedc299791a910e183d (commit) from 7187d03f725fb36bd636d7dd49323e7c1835e5c8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 8ac81e012926ef4b9466f8b19cf161f0a7d04838 Author: Bob Peterson [EMAIL PROTECTED] Date: Fri Jul 25 08:48:50 2008 -0500 gfs2_edit: was parsing out gfs1 log descriptors improperly GFS2 log descriptors have 8 bytes per entry which represents a block number. GFS1 log descriptors have a small structure that is 16-bytes, the first 8 bytes of which is the block. So gfs2_edit was mistaking the extra 0x for a GFS2 end-of-block marker when it shouldn't have. This fixes it. commit e9a3bcc3a70f9da48e1c5dedc299791a910e183d Author: Bob Peterson [EMAIL PROTECTED] Date: Fri Jul 25 08:17:12 2008 -0500 gfs2_edit: Ability to enter journalX in block number. With gfs2_edit, you can position to the block # field and press enter, then enter a block number to jump to. You may also enter a keyword, like root to jump to the root directory, rindex to jump to the rindex, etc. Most keywords worked, but you could not enter journal0 to jump to the first journal until this fix made it possible. --- Summary of changes: gfs2/edit/hexedit.c | 120 +-- 1 files changed, 78 insertions(+), 42 deletions(-) diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c index 15e1f58..78de17f 100644 --- a/gfs2/edit/hexedit.c +++ b/gfs2/edit/hexedit.c @@ -147,6 +147,7 @@ int bobgets(char string[],int x,int y,int sz,int *ch) case('\r'): rc=1; done=TRUE; + string[runningy-y] = '\0'; break; case(KEY_CANCEL): case(0x01B): @@ -1628,6 +1629,60 @@ uint64_t pop_block(void) } /* */ +/* find_journal_block - figure out where a journal starts, given the name */ +/* Returns: journal block number, changes j_size to the journal size*/ +/* */ +uint64_t find_journal_block(const char *journal, uint64_t *j_size) +{ + int journal_num; + uint64_t jindex_block, jblock = 0; + int amtread; + struct gfs2_buffer_head *jindex_bh, *j_bh; + char jbuf[sbd.bsize]; + struct gfs2_inode *j_inode = NULL; + + journal_num = atoi(journal + 7); + /* Figure out the block of the jindex file */ + if (gfs1) + jindex_block = sbd1-sb_jindex_di.no_addr; + else + jindex_block = masterblock(jindex); + /* read in the block */ + jindex_bh = bread(sbd, jindex_block); + /* get the dinode data from it. */ + gfs2_dinode_in(di, jindex_bh-b_data); /* parse disk inode to struct*/ + + if (!gfs1) + do_dinode_extended(di, jindex_bh-b_data); /* parse dir. */ + brelse(jindex_bh, not_updated); + + if (gfs1) { + struct gfs2_inode *jiinode; + struct gfs_jindex ji; + + jiinode = inode_get(sbd, jindex_bh); + amtread = gfs2_readi(jiinode, (void *)jbuf, + journal_num * sizeof(struct gfs_jindex), + sizeof(struct gfs_jindex)); + if (amtread) { + gfs_jindex_in(ji, jbuf); + jblock = ji.ji_addr; + *j_size = ji.ji_nsegment * 0x10; + } + } else { + struct gfs2_dinode jdi; + + jblock = indirect-ii[0].dirent[journal_num + 2].block; + j_bh = bread(sbd, jblock); + j_inode = inode_get(sbd, j_bh); + gfs2_dinode_in(jdi, j_bh-b_data);/* parse dinode to struct */ + *j_size = jdi.di_size; + brelse(j_bh, not_updated); + } + return jblock; +} + +/* */ /* Check if the word is a keyword such as sb or rindex */ /* Returns: block number if it is, else 0 */ /*
[Cluster-devel] Cluster Project branch, RHEL5, updated. cmirror_1_1_15-177-ge0ff895
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=e0ff895e257924ddba53244b01445f6665a2e163 The branch, RHEL5 has been updated via e0ff895e257924ddba53244b01445f6665a2e163 (commit) via 56402ca4bb288b12a60e6e5ea93af5b58e2ed8c0 (commit) from ff1d4eebbc91c9fdfd427e84a2013c0a7efddd41 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit e0ff895e257924ddba53244b01445f6665a2e163 Author: Bob Peterson [EMAIL PROTECTED] Date: Fri Jul 25 08:48:50 2008 -0500 gfs2_edit: was parsing out gfs1 log descriptors improperly bz 450004 GFS2 log descriptors have 8 bytes per entry which represents a block number. GFS1 log descriptors have a small structure that is 16-bytes, the first 8 bytes of which is the block. So gfs2_edit was mistaking the extra 0x for a GFS2 end-of-block marker when it shouldn't have. This fixes it. commit 56402ca4bb288b12a60e6e5ea93af5b58e2ed8c0 Author: Bob Peterson [EMAIL PROTECTED] Date: Fri Jul 25 08:17:12 2008 -0500 gfs2_edit: Ability to enter journalX in block number. bz 450004 With gfs2_edit, you can position to the block # field and press enter, then enter a block number to jump to. You may also enter a keyword, like root to jump to the root directory, rindex to jump to the rindex, etc. Most keywords worked, but you could not enter journal0 to jump to the first journal until this fix made it possible. --- Summary of changes: gfs2/edit/hexedit.c | 120 +-- 1 files changed, 78 insertions(+), 42 deletions(-) diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c index b169135..5a0e619 100644 --- a/gfs2/edit/hexedit.c +++ b/gfs2/edit/hexedit.c @@ -162,6 +162,7 @@ int bobgets(char string[],int x,int y,int sz,int *ch) case('\r'): rc=1; done=TRUE; + string[runningy-y] = '\0'; break; case(KEY_CANCEL): case(0x01B): @@ -1626,6 +1627,60 @@ uint64_t pop_block(void) } /* */ +/* find_journal_block - figure out where a journal starts, given the name */ +/* Returns: journal block number, changes j_size to the journal size*/ +/* */ +uint64_t find_journal_block(const char *journal, uint64_t *j_size) +{ + int journal_num; + uint64_t jindex_block, jblock = 0; + int amtread; + struct gfs2_buffer_head *jindex_bh, *j_bh; + char jbuf[sbd.bsize]; + struct gfs2_inode *j_inode = NULL; + + journal_num = atoi(journal + 7); + /* Figure out the block of the jindex file */ + if (gfs1) + jindex_block = sbd1-sb_jindex_di.no_addr; + else + jindex_block = masterblock(jindex); + /* read in the block */ + jindex_bh = bread(sbd, jindex_block); + /* get the dinode data from it. */ + gfs2_dinode_in(di, jindex_bh-b_data); /* parse disk inode to struct*/ + + if (!gfs1) + do_dinode_extended(di, jindex_bh-b_data); /* parse dir. */ + brelse(jindex_bh, not_updated); + + if (gfs1) { + struct gfs2_inode *jiinode; + struct gfs_jindex ji; + + jiinode = inode_get(sbd, jindex_bh); + amtread = gfs2_readi(jiinode, (void *)jbuf, + journal_num * sizeof(struct gfs_jindex), + sizeof(struct gfs_jindex)); + if (amtread) { + gfs_jindex_in(ji, jbuf); + jblock = ji.ji_addr; + *j_size = ji.ji_nsegment * 0x10; + } + } else { + struct gfs2_dinode jdi; + + jblock = indirect-ii[0].dirent[journal_num + 2].block; + j_bh = bread(sbd, jblock); + j_inode = inode_get(sbd, j_bh); + gfs2_dinode_in(jdi, j_bh-b_data);/* parse dinode to struct */ + *j_size = jdi.di_size; + brelse(j_bh, not_updated); + } + return jblock; +} + +/* */ /* Check if the word is a keyword such as sb or rindex */ /* Returns: block number if it is, else 0
[Cluster-devel] Cluster Project branch, STABLE2, updated. cluster-2.03.05-7-gba6da46
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=ba6da460dab95afa3219e1ec910e4ead30e12a81 The branch, STABLE2 has been updated via ba6da460dab95afa3219e1ec910e4ead30e12a81 (commit) from 89b350ba3503a63e1b3ef6cfaccfcb71407354ac (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit ba6da460dab95afa3219e1ec910e4ead30e12a81 Author: Bob Peterson [EMAIL PROTECTED] Date: Mon Jul 21 17:37:31 2008 -0500 Print log header flags for gfs journals. --- Summary of changes: gfs2/edit/hexedit.c | 11 ++- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c index fa65000..15e1f58 100644 --- a/gfs2/edit/hexedit.c +++ b/gfs2/edit/hexedit.c @@ -2305,11 +2305,12 @@ void dump_journal(const char *journal) if (gfs1) { gfs_log_header_in(lh1, jbuf); - print_gfs2(Block #%4llx: Log header: Seq - = 0x%x, first = 0x%x tail = - 0x%x, last = 0x%x, - jb, lh1.lh_sequence, lh1.lh_first, - lh1.lh_tail, lh1.lh_last_dump); + print_gfs2(Block #%4llx: Log header: Flags = + %08x, Seq = 0x%x, first = 0x%x + tail = 0x%x, last = 0x%x, + jb, lh1.lh_flags, lh1.lh_sequence, + lh1.lh_first, lh1.lh_tail, + lh1.lh_last_dump); } else { gfs2_log_header_in(lh, jbuf); print_gfs2(Block #%4llx: Log header: Seq hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, RHEL5, updated. cmirror_1_1_15-161-g5ff7b66
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=5ff7b6671b739796e5c3f4f2f8cc0005015936cc The branch, RHEL5 has been updated via 5ff7b6671b739796e5c3f4f2f8cc0005015936cc (commit) via e9edb213078c4d59a5f229a98cb157fcbe977df8 (commit) via dee2b071cdace918515cddd1904df1d5d86c7dfc (commit) via 7492a086097d72db89d105f0f38004e7a106a1c4 (commit) via 28610e88b1706a296780193bbb7b6072bb972c24 (commit) via 8a4a16fd453c507b6d9aa492b5f0bbb687b40c64 (commit) via 4a138cb97b20c1abd2aa4c7740a27d80b3a060eb (commit) via 47f97db79bef3295e490c86bdefc37ba5c58e58e (commit) via ddcf644dfa303fb2ca2363a6f34033438dd358c7 (commit) via 6d4364e8aaec211b27ce19ae2997351d7d179263 (commit) via d4b869fcf12cdae55f9558d69dc254aa675b09e8 (commit) from b2916471b1b7c79dba7f9624a1a148240375891f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 5ff7b6671b739796e5c3f4f2f8cc0005015936cc Author: Bob Peterson [EMAIL PROTECTED] Date: Wed Jul 16 19:02:56 2008 -0500 Print log header flags for gfs journals. commit e9edb213078c4d59a5f229a98cb157fcbe977df8 Author: Bob Peterson [EMAIL PROTECTED] Date: Thu Jul 10 16:12:53 2008 -0500 Fix some minor white space issues. commit dee2b071cdace918515cddd1904df1d5d86c7dfc Author: Bob Peterson [EMAIL PROTECTED] Date: Mon Jun 23 10:11:35 2008 -0500 savemeta was not saving gfs1 journals properly. commit 7492a086097d72db89d105f0f38004e7a106a1c4 Author: Bob Peterson [EMAIL PROTECTED] Date: Thu Jun 5 18:00:07 2008 -0500 Ability to specify starting block or structure with -s commit 28610e88b1706a296780193bbb7b6072bb972c24 Author: Bob Peterson [EMAIL PROTECTED] Date: Thu Jun 5 16:23:37 2008 -0500 Allow keywords in block number input commit 8a4a16fd453c507b6d9aa492b5f0bbb687b40c64 Author: Bob Peterson [EMAIL PROTECTED] Date: Thu Jun 5 13:47:16 2008 -0500 Updates to gfs2_edit man page for new options. commit 4a138cb97b20c1abd2aa4c7740a27d80b3a060eb Author: Bob Peterson [EMAIL PROTECTED] Date: Wed Jun 4 08:39:20 2008 -0500 Fix gfs2_edit bugs with non-4K block sizes commit 47f97db79bef3295e490c86bdefc37ba5c58e58e Author: Bob Peterson [EMAIL PROTECTED] Date: Thu Apr 10 10:45:47 2008 -0500 Fix some compiler warnings in gfs2_edit commit ddcf644dfa303fb2ca2363a6f34033438dd358c7 Author: Bob Peterson [EMAIL PROTECTED] Date: Thu Apr 10 10:45:47 2008 -0500 gfs2_edit was not recalculating the max block size after it figured that out. commit 6d4364e8aaec211b27ce19ae2997351d7d179263 Author: Bob Peterson [EMAIL PROTECTED] Date: Tue Mar 18 15:44:24 2008 -0500 Fix gfs2_edit print options (-p) to work properly for gfs-1 rgs and rindex. Also fixed rgflags option for gfs1. commit d4b869fcf12cdae55f9558d69dc254aa675b09e8 Author: Bob Peterson [EMAIL PROTECTED] Date: Tue Mar 11 18:18:43 2008 -0500 Fix savemeta so it saves gfs-1 rg information properly Also add savergs option to facilitate rg-only repairs. --- Summary of changes: gfs2/edit/gfs2hex.c | 28 ++-- gfs2/edit/hexedit.c | 461 -- gfs2/edit/hexedit.h | 34 - gfs2/edit/savemeta.c | 109 - gfs2/man/gfs2_edit.8 | 51 ++- 5 files changed, 459 insertions(+), 224 deletions(-) diff --git a/gfs2/edit/gfs2hex.c b/gfs2/edit/gfs2hex.c index a56b4ee..082f5b6 100644 --- a/gfs2/edit/gfs2hex.c +++ b/gfs2/edit/gfs2hex.c @@ -38,7 +38,6 @@ extern struct gfs2_sb sb; extern char *buf; extern struct gfs2_dinode di; -extern uint64_t bufsize; extern int line, termlines; extern char edit_fmt[80]; extern char estring[1024]; @@ -70,9 +69,9 @@ void print_gfs2(const char *fmt, ...) va_start(args, fmt); vsprintf(string, fmt, args); if (termlines) - printw(string); + printw(%s, string); else - printf(string); + printf(%s, string); va_end(args); } @@ -127,9 +126,9 @@ void print_it(const char *label, const char *fmt, const char *fmt2, ...) vsprintf(tmp_string, fmt, args); if (termlines) - printw(tmp_string); + printw(%s, tmp_string); else - printf(tmp_string); + printf(%s, tmp_string); check_highlight(FALSE); if (fmt2) { @@ -159,10 +158,10 @@ void print_it(const char *label, const char *fmt, const char *fmt2, ...)
[Cluster-devel] Cluster Project branch, master, updated. cluster-2.99.05-1-g7fc8db7
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=7fc8db7f157c928372f99412fc238a303c8f3b2d The branch, master has been updated via 7fc8db7f157c928372f99412fc238a303c8f3b2d (commit) from 12bd7c01cac39996f7b4a481bb476b141bf46149 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 7fc8db7f157c928372f99412fc238a303c8f3b2d Author: Bob Peterson [EMAIL PROTECTED] Date: Tue Jun 24 15:39:45 2008 -0500 gfs2_fsck fails: Unable to read in jindex inode. --- Summary of changes: gfs2/libgfs2/super.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/gfs2/libgfs2/super.c b/gfs2/libgfs2/super.c index b7cb5d8..88708fe 100644 --- a/gfs2/libgfs2/super.c +++ b/gfs2/libgfs2/super.c @@ -67,6 +67,7 @@ int read_sb(struct gfs2_sbd *sdp) goto out; sdp-sd_fsb2bb_shift = sdp-sd_sb.sb_bsize_shift - GFS2_BASIC_BLOCK_SHIFT; + sdp-bsize = sdp-sd_sb.sb_bsize; sdp-sd_diptrs = (sdp-sd_sb.sb_bsize-sizeof(struct gfs2_dinode)) / sizeof(uint64_t); hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, STABLE2, updated. cluster-2.03.04-28-g7d7d255
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=7d7d255cc63305a49c581cca4f03d69da15ed491 The branch, STABLE2 has been updated via 7d7d255cc63305a49c581cca4f03d69da15ed491 (commit) from a193e83fa55d43c3216ac64d28252a9c2cf2b5ae (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 7d7d255cc63305a49c581cca4f03d69da15ed491 Author: Bob Peterson [EMAIL PROTECTED] Date: Tue Jun 24 15:39:45 2008 -0500 gfs2_fsck fails: Unable to read in jindex inode. --- Summary of changes: gfs2/libgfs2/super.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/gfs2/libgfs2/super.c b/gfs2/libgfs2/super.c index b7cb5d8..88708fe 100644 --- a/gfs2/libgfs2/super.c +++ b/gfs2/libgfs2/super.c @@ -67,6 +67,7 @@ int read_sb(struct gfs2_sbd *sdp) goto out; sdp-sd_fsb2bb_shift = sdp-sd_sb.sb_bsize_shift - GFS2_BASIC_BLOCK_SHIFT; + sdp-bsize = sdp-sd_sb.sb_bsize; sdp-sd_diptrs = (sdp-sd_sb.sb_bsize-sizeof(struct gfs2_dinode)) / sizeof(uint64_t); hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, RHEL5, updated. cmirror_1_1_15-124-gdc34587
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=dc3458731de32d3619bb310e74593e5f07a770de The branch, RHEL5 has been updated via dc3458731de32d3619bb310e74593e5f07a770de (commit) from 0670e032ed29a421a14f0b7e176e254880de28ea (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit dc3458731de32d3619bb310e74593e5f07a770de Author: Bob Peterson [EMAIL PROTECTED] Date: Tue Jun 24 15:39:45 2008 -0500 gfs2_fsck fails: Unable to read in jindex inode. --- Summary of changes: gfs2/libgfs2/super.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/gfs2/libgfs2/super.c b/gfs2/libgfs2/super.c index b023c8f..1af87c1 100644 --- a/gfs2/libgfs2/super.c +++ b/gfs2/libgfs2/super.c @@ -80,6 +80,7 @@ int read_sb(struct gfs2_sbd *sdp) goto out; sdp-sd_fsb2bb_shift = sdp-sd_sb.sb_bsize_shift - GFS2_BASIC_BLOCK_SHIFT; + sdp-bsize = sdp-sd_sb.sb_bsize; sdp-sd_diptrs = (sdp-sd_sb.sb_bsize-sizeof(struct gfs2_dinode)) / sizeof(uint64_t); hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, master, updated. cluster-2.99.04-59-g534045c
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=534045c7da331333e5389c4f25356931bebb583e The branch, master has been updated via 534045c7da331333e5389c4f25356931bebb583e (commit) from a2f1025d6e1595475afcdcd68d6f8205ecf99412 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 534045c7da331333e5389c4f25356931bebb583e Author: Bob Peterson [EMAIL PROTECTED] Date: Mon Jun 23 11:28:57 2008 -0500 savemeta was not saving gfs1 journals properly. --- Summary of changes: gfs2/edit/savemeta.c | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/gfs2/edit/savemeta.c b/gfs2/edit/savemeta.c index c6ef3bd..668501f 100644 --- a/gfs2/edit/savemeta.c +++ b/gfs2/edit/savemeta.c @@ -37,6 +37,7 @@ struct saved_metablock *savedata; uint64_t last_fs_block, last_reported_block, blks_saved, total_out, pct; struct gfs2_block_list *blocklist = NULL; uint64_t journal_blocks[MAX_JOURNALS_SAVED]; +uint64_t gfs1_journal_size = 0; /* in blocks */ int journals_found = 0; extern void read_superblock(void); @@ -699,6 +700,7 @@ void get_journal_inode_blocks(void) break; gfs_jindex_in(ji, jbuf); jblock = ji.ji_addr; + gfs1_journal_size = ji.ji_nsegment * 16; } else { if (journal indirect-ii[0].dirents - 3) break; @@ -802,9 +804,20 @@ void savemeta(const char *out_fn, int saveoption) /* If this is gfs1, save off the rindex because it's not part of the file system as it is in gfs2. */ if (gfs1) { + int j; + block = sbd1-sb_rindex_di.no_addr; save_block(sbd.device_fd, out_fd, block); save_inode_data(out_fd); + /* In GFS1, journals aren't part of the RG space */ + for (j = 0; j journals_found; j++) { + log_debug(Saving journal #%d\n, j + 1); + for (block = journal_blocks[j]; +block journal_blocks[j] + +gfs1_journal_size; +block++) + save_block(sbd.device_fd, out_fd, block); + } } /* Walk through the resource groups saving everything within */ for (tmp = sbd.rglist.next; tmp != sbd.rglist; hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, STABLE2, updated. cluster-2.03.04-17-gac95cea
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=ac95cea5aa26a149e2d34d156186aa29329e7952 The branch, STABLE2 has been updated via ac95cea5aa26a149e2d34d156186aa29329e7952 (commit) from c09bd25b65204a44bf22aaec38fc66f7be66e038 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit ac95cea5aa26a149e2d34d156186aa29329e7952 Author: Bob Peterson [EMAIL PROTECTED] Date: Wed Jun 18 14:07:26 2008 -0500 452004: gfs: BUG: unable to handle kernel paging request. This is a gfs crosswrite from gfs2, to be included with 446085 in RHEL5. --- Summary of changes: gfs-kernel/src/gfs/bits.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/gfs-kernel/src/gfs/bits.c b/gfs-kernel/src/gfs/bits.c index dc54215..4265db8 100644 --- a/gfs-kernel/src/gfs/bits.c +++ b/gfs-kernel/src/gfs/bits.c @@ -161,7 +161,7 @@ ulong_aligned: depending on architecture. I've experimented with several ways of writing this section such as using an else before the goto but this one seems to be the fastest. */ - while ((unsigned char *)plong end - 1) { + while ((unsigned char *)plong end - sizeof(unsigned long)) { prefetch(plong + 1); if (((*plong) LBITMASK) != lskipval) break; hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, RHEL5, updated. cmirror_1_1_15-117-g151f914
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=151f91487730addf1edd1bcf47e4ee5a4cb2ae78 The branch, RHEL5 has been updated via 151f91487730addf1edd1bcf47e4ee5a4cb2ae78 (commit) via 343655ae1fccc393bd92128ec90058f7de722e77 (commit) from ce02ccaa6fdbb1192c5e9714c06347f7f37bf0de (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 151f91487730addf1edd1bcf47e4ee5a4cb2ae78 Author: Bob Peterson [EMAIL PROTECTED] Date: Wed Jun 18 14:07:26 2008 -0500 452004: gfs: BUG: unable to handle kernel paging request. This is a gfs crosswrite from gfs2, to be included with 446085 in RHEL5. commit 343655ae1fccc393bd92128ec90058f7de722e77 Author: Bob Peterson [EMAIL PROTECTED] Date: Tue May 20 09:37:53 2008 -0500 bz 446085: Back-port faster bitfit algorithm from gfs2 for better performance. --- Summary of changes: gfs-kernel/src/gfs/bits.c | 85 +++- gfs-kernel/src/gfs/bits.h |3 +- gfs-kernel/src/gfs/rgrp.c |3 +- 3 files changed, 62 insertions(+), 29 deletions(-) diff --git a/gfs-kernel/src/gfs/bits.c b/gfs-kernel/src/gfs/bits.c index da08a23..7702ea1 100644 --- a/gfs-kernel/src/gfs/bits.c +++ b/gfs-kernel/src/gfs/bits.c @@ -31,6 +31,16 @@ #include gfs.h #include bits.h +#if BITS_PER_LONG == 32 +#define LBITMASK (0xUL) +#define LBITSKIP55 (0xUL) +#define LBITSKIP00 (0xUL) +#else +#define LBITMASK (0xUL) +#define LBITSKIP55 (0xUL) +#define LBITSKIP00 (0xUL) +#endif + static const char valid_change[16] = { /* current */ /* n */ 0, 1, 1, 1, @@ -115,41 +125,66 @@ gfs_testbit(struct gfs_rgrpd *rgd, */ uint32_t -gfs_bitfit(struct gfs_rgrpd *rgd, - unsigned char *buffer, unsigned int buflen, +gfs_bitfit(unsigned char *buffer, unsigned int buflen, uint32_t goal, unsigned char old_state) { - unsigned char *byte, *end, alloc; - uint32_t blk = goal; - unsigned int bit; - - byte = buffer + (goal / GFS_NBBY); - bit = (goal % GFS_NBBY) * GFS_BIT_SIZE; - end = buffer + buflen; - alloc = (old_state 1) ? 0 : 0x55; - + const u8 *byte, *start, *end; + int bit, startbit; + u32 g1, g2, misaligned; + unsigned long *plong; + unsigned long lskipval; + + lskipval = (old_state GFS_BLKST_USED) ? LBITSKIP00 : LBITSKIP55; + g1 = (goal / GFS_NBBY); + start = buffer + g1; + byte = start; +end = buffer + buflen; + g2 = ALIGN(g1, sizeof(unsigned long)); + plong = (unsigned long *)(buffer + g2); + startbit = bit = (goal % GFS_NBBY) * GFS_BIT_SIZE; + misaligned = g2 - g1; + if (!misaligned) + goto ulong_aligned; +/* parse the bitmap a byte at a time */ +misaligned: while (byte end) { - if ((*byte 0x55) == alloc) { - blk += (8 - bit) 1; - - bit = 0; - byte++; - - continue; + if (((*byte bit) GFS_BIT_MASK) == old_state) { + return goal + + (((byte - start) * GFS_NBBY) + +((bit - startbit) 1)); } - - if (((*byte bit) GFS_BIT_MASK) == old_state) - return blk; - bit += GFS_BIT_SIZE; - if (bit = 8) { + if (bit = GFS_NBBY * GFS_BIT_SIZE) { bit = 0; byte++; + misaligned--; + if (!misaligned) { + plong = (unsigned long *)byte; + goto ulong_aligned; + } } - - blk++; } + return BFITNOENT; +/* parse the bitmap a unsigned long at a time */ +ulong_aligned: + /* Stop at end - 1 or else prefetch can go past the end and segfault. + We could if it but we'd lose some of the performance gained. + This way will only slow down searching the very last 4/8 bytes + depending on architecture. I've experimented with several ways + of writing this section such as using an else before the goto + but this one seems to be the fastest. */ + while ((unsigned char *)plong end - sizeof(unsigned long)) { + prefetch(plong + 1); + if (((*plong) LBITMASK) !=
[Cluster-devel] Cluster Project branch, master, updated. cluster-2.99.04-24-g4241dfc
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=4241dfca2b9bce447f2fde2fac240c9503388eb7 The branch, master has been updated via 4241dfca2b9bce447f2fde2fac240c9503388eb7 (commit) from 552a28f82bf2aef8ea05af0a3c9c1702ba23326c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 4241dfca2b9bce447f2fde2fac240c9503388eb7 Author: Bob Peterson [EMAIL PROTECTED] Date: Fri Jun 13 08:43:26 2008 -0500 Fix 32-bit warning in super.c. --- Summary of changes: gfs/gfs_fsck/super.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/gfs/gfs_fsck/super.c b/gfs/gfs_fsck/super.c index b18228c..b2c81f1 100644 --- a/gfs/gfs_fsck/super.c +++ b/gfs/gfs_fsck/super.c @@ -1160,7 +1160,7 @@ int ri_update(struct fsck_sb *sdp) free(expected_rgd); } /* if we can't trust the rg index */ else { /* blind faith -- just check for the gfs_grow problem */ - if (rgd-rd_ri.ri_data == 4294967292) { + if (rgd-rd_ri.ri_data == (uint32_t)-4) { if (!fix_grow_problems) { log_err(A problem with the rindex file caused by gfs_grow was detected.\n); if(query(sdp, Fix the rindex problem? (y/n))) hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, STABLE2, updated. cluster-2.03.04-12-g72e56df
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=72e56df08d77b3ff2bea852dcf66ce7b3eb6171e The branch, STABLE2 has been updated via 72e56df08d77b3ff2bea852dcf66ce7b3eb6171e (commit) from 82c082823e91ad190592cffb7a3dad3f187b3713 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 72e56df08d77b3ff2bea852dcf66ce7b3eb6171e Author: Bob Peterson [EMAIL PROTECTED] Date: Fri Jun 13 08:43:26 2008 -0500 Fix 32-bit warning in super.c. --- Summary of changes: gfs/gfs_fsck/super.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/gfs/gfs_fsck/super.c b/gfs/gfs_fsck/super.c index b18228c..b2c81f1 100644 --- a/gfs/gfs_fsck/super.c +++ b/gfs/gfs_fsck/super.c @@ -1160,7 +1160,7 @@ int ri_update(struct fsck_sb *sdp) free(expected_rgd); } /* if we can't trust the rg index */ else { /* blind faith -- just check for the gfs_grow problem */ - if (rgd-rd_ri.ri_data == 4294967292) { + if (rgd-rd_ri.ri_data == (uint32_t)-4) { if (!fix_grow_problems) { log_err(A problem with the rindex file caused by gfs_grow was detected.\n); if(query(sdp, Fix the rindex problem? (y/n))) hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, master, updated. cluster-2.99.04-16-gf6e278d
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=f6e278da051d685d7bd791abe93d9911db50adea The branch, master has been updated via f6e278da051d685d7bd791abe93d9911db50adea (commit) from 8c4044a4131dbf70a0f276fdb7b5261f1e37d980 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit f6e278da051d685d7bd791abe93d9911db50adea Author: Bob Peterson [EMAIL PROTECTED] Date: Thu Jun 12 08:27:51 2008 -0500 Fix another compiler warning for 32-bit arch. --- Summary of changes: gfs2/quota/main.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/gfs2/quota/main.c b/gfs2/quota/main.c index 79aae05..aac3cf6 100644 --- a/gfs2/quota/main.c +++ b/gfs2/quota/main.c @@ -316,7 +316,8 @@ read_quota_internal(int fd, uint32_t id, int id_type, struct gfs2_quota *q) die(failed to read from quota file: %s\n, strerror(errno)); if (error != sizeof(struct gfs2_quota)) die(Couldn't read %lu bytes from quota file at offset %llu\n, - sizeof(struct gfs2_quota), (unsigned long long)offset); + (unsigned long)sizeof(struct gfs2_quota), + (unsigned long long)offset); gfs2_quota_in(q, buf); } hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, STABLE2, updated. cluster-2.03.04-4-g292e214
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=292e214c55cd3016e184f7d831255b0ffea1af75 The branch, STABLE2 has been updated via 292e214c55cd3016e184f7d831255b0ffea1af75 (commit) from a48fcfecbb971f65c3f3e6296f9e40419dd3e035 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 292e214c55cd3016e184f7d831255b0ffea1af75 Author: Bob Peterson [EMAIL PROTECTED] Date: Thu Jun 12 08:27:51 2008 -0500 Fix another compiler warning for 32-bit arch. --- Summary of changes: gfs2/quota/main.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/gfs2/quota/main.c b/gfs2/quota/main.c index 79aae05..aac3cf6 100644 --- a/gfs2/quota/main.c +++ b/gfs2/quota/main.c @@ -316,7 +316,8 @@ read_quota_internal(int fd, uint32_t id, int id_type, struct gfs2_quota *q) die(failed to read from quota file: %s\n, strerror(errno)); if (error != sizeof(struct gfs2_quota)) die(Couldn't read %lu bytes from quota file at offset %llu\n, - sizeof(struct gfs2_quota), (unsigned long long)offset); + (unsigned long)sizeof(struct gfs2_quota), + (unsigned long long)offset); gfs2_quota_in(q, buf); } hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, master, updated. cluster-2.99.04-18-g33eb572
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=33eb5724d102b7db2d5370623343ae2e74d46edb The branch, master has been updated via 33eb5724d102b7db2d5370623343ae2e74d46edb (commit) from 4770c30eb41d85c6991e1d40b5cd2b906a8e271e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 33eb5724d102b7db2d5370623343ae2e74d46edb Author: Bob Peterson [EMAIL PROTECTED] Date: Thu Jun 12 10:48:08 2008 -0500 Fix build warnings from libgfs --- Summary of changes: gfs/libgfs/file.c |2 +- gfs/libgfs/fs_bits.c |6 +++--- gfs/libgfs/fs_dir.c |6 +++--- gfs/libgfs/fs_inode.c |2 +- gfs/libgfs/log.c |8 gfs/libgfs/rgrp.c |8 ++-- gfs/libgfs/util.c |6 +++--- 7 files changed, 21 insertions(+), 17 deletions(-) diff --git a/gfs/libgfs/file.c b/gfs/libgfs/file.c index dad8c82..ff1dd2a 100644 --- a/gfs/libgfs/file.c +++ b/gfs/libgfs/file.c @@ -214,7 +214,7 @@ int writei(int disk_fd, struct gfs_inode *ip, void *buf, uint64_t offset, ip-i_di.di_size = start + copied; ip-i_di.di_mtime = ip-i_di.di_ctime = osi_current_time(); - gfs_dinode_out(ip-i_di, BH_DATA(dibh)); + gfs_dinode_out(ip-i_di, (char *)BH_DATA(dibh)); write_buf(disk_fd, dibh, 0); relse_buf(dibh); diff --git a/gfs/libgfs/fs_bits.c b/gfs/libgfs/fs_bits.c index 6f4f857..3509763 100644 --- a/gfs/libgfs/fs_bits.c +++ b/gfs/libgfs/fs_bits.c @@ -276,8 +276,8 @@ int fs_get_bitmap(int disk_fd, struct gfs_sbd *sdp, uint64 blkno, struct gfs_rgr return -1; } - byte = (BH_DATA(rgd-rd_bh[buf]) + bits-bi_offset) + - (rgrp_block/GFS_NBBY - bits-bi_start); + byte = (unsigned char *)((BH_DATA(rgd-rd_bh[buf]) + bits-bi_offset) + +(rgrp_block/GFS_NBBY - bits-bi_start)); bit = (rgrp_block % GFS_NBBY) * GFS_BIT_SIZE; val = ((*byte bit) GFS_BIT_MASK); @@ -332,7 +332,7 @@ int fs_set_bitmap(int disk_fd, struct gfs_sbd *sdp, uint64 blkno, int state) } } - fs_setbit(BH_DATA(rgd-rd_bh[buf]) + bits-bi_offset, + fs_setbit((unsigned char *)BH_DATA(rgd-rd_bh[buf]) + bits-bi_offset, bits-bi_len, (rgrp_block - (bits-bi_start*GFS_NBBY)), state); diff --git a/gfs/libgfs/fs_dir.c b/gfs/libgfs/fs_dir.c index 0526fa6..0d704d4 100644 --- a/gfs/libgfs/fs_dir.c +++ b/gfs/libgfs/fs_dir.c @@ -2,7 +2,7 @@ #include link.h #include libgfs.h -#define dir_hash(qstr) (gfs_dir_hash((qstr)-name, (qstr)-len)) +#define dir_hash(qstr) (gfs_dir_hash((char *)(qstr)-name, (qstr)-len)) /* Detect directory is a stuffed inode */ int gfs_inode_is_stuffed(struct gfs_inode *ip) @@ -144,7 +144,7 @@ int dirent_del(int disk_fd, struct gfs_inode *dip, osi_buf_t *bh, return -1; } - if((char *)cur + cur_rec_len BH_DATA(bh) + BH_SIZE(bh)){ + if((char *)(cur) + cur_rec_len BH_DATA(bh) + BH_SIZE(bh)){ log_err(dirent_del: Directory entry has record length longer than buffer.\n); return -1; @@ -444,7 +444,7 @@ static int linked_leaf_search(int disk_fd, struct gfs_inode *dip, static int dir_e_search(int disk_fd, struct gfs_inode *dip, identifier_t *id, unsigned int *type) { - osi_buf_t *bh; + osi_buf_t *bh = NULL; struct gfs_dirent *dent; int error; diff --git a/gfs/libgfs/fs_inode.c b/gfs/libgfs/fs_inode.c index 1590364..51f6e9b 100644 --- a/gfs/libgfs/fs_inode.c +++ b/gfs/libgfs/fs_inode.c @@ -371,7 +371,7 @@ int fs_mkdir(int disk_fd, struct gfs_inode *dip, char *new_dir, osi_filename_t name; int new; - name.name = new_dir; + name.name = (unsigned char *)new_dir; name.len = strlen(new_dir); creds.cr_uid = getuid(); creds.cr_gid = getgid(); diff --git a/gfs/libgfs/log.c b/gfs/libgfs/log.c index 977e25b..52e0942 100644 --- a/gfs/libgfs/log.c +++ b/gfs/libgfs/log.c @@ -98,7 +98,7 @@ int query(struct options *opts, const char *format, ...) log_debug(Error in select() on stdin\n); break; } - read(STDIN_FILENO, response, sizeof(char)); + err = read(STDIN_FILENO, response, sizeof(char)); } query: @@ -108,7 +108,7 @@ int query(struct options *opts, const char *format, ...) fflush(NULL); rescan: -
[Cluster-devel] Cluster Project branch, STABLE2, updated. cluster-2.03.04-6-ge7ef9a9
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=e7ef9a9554bb7ffa4d5f280f48259b2c3507bff1 The branch, STABLE2 has been updated via e7ef9a9554bb7ffa4d5f280f48259b2c3507bff1 (commit) from b9bb6fd6def26cfb2dfd860a7969144cf381 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit e7ef9a9554bb7ffa4d5f280f48259b2c3507bff1 Author: Bob Peterson [EMAIL PROTECTED] Date: Thu Jun 12 10:48:08 2008 -0500 Fix build warnings from libgfs --- Summary of changes: gfs/libgfs/file.c |2 +- gfs/libgfs/fs_bits.c |6 +++--- gfs/libgfs/fs_dir.c |6 +++--- gfs/libgfs/fs_inode.c |2 +- gfs/libgfs/log.c |8 gfs/libgfs/rgrp.c |8 ++-- gfs/libgfs/util.c |6 +++--- 7 files changed, 21 insertions(+), 17 deletions(-) diff --git a/gfs/libgfs/file.c b/gfs/libgfs/file.c index dad8c82..ff1dd2a 100644 --- a/gfs/libgfs/file.c +++ b/gfs/libgfs/file.c @@ -214,7 +214,7 @@ int writei(int disk_fd, struct gfs_inode *ip, void *buf, uint64_t offset, ip-i_di.di_size = start + copied; ip-i_di.di_mtime = ip-i_di.di_ctime = osi_current_time(); - gfs_dinode_out(ip-i_di, BH_DATA(dibh)); + gfs_dinode_out(ip-i_di, (char *)BH_DATA(dibh)); write_buf(disk_fd, dibh, 0); relse_buf(dibh); diff --git a/gfs/libgfs/fs_bits.c b/gfs/libgfs/fs_bits.c index 6f4f857..3509763 100644 --- a/gfs/libgfs/fs_bits.c +++ b/gfs/libgfs/fs_bits.c @@ -276,8 +276,8 @@ int fs_get_bitmap(int disk_fd, struct gfs_sbd *sdp, uint64 blkno, struct gfs_rgr return -1; } - byte = (BH_DATA(rgd-rd_bh[buf]) + bits-bi_offset) + - (rgrp_block/GFS_NBBY - bits-bi_start); + byte = (unsigned char *)((BH_DATA(rgd-rd_bh[buf]) + bits-bi_offset) + +(rgrp_block/GFS_NBBY - bits-bi_start)); bit = (rgrp_block % GFS_NBBY) * GFS_BIT_SIZE; val = ((*byte bit) GFS_BIT_MASK); @@ -332,7 +332,7 @@ int fs_set_bitmap(int disk_fd, struct gfs_sbd *sdp, uint64 blkno, int state) } } - fs_setbit(BH_DATA(rgd-rd_bh[buf]) + bits-bi_offset, + fs_setbit((unsigned char *)BH_DATA(rgd-rd_bh[buf]) + bits-bi_offset, bits-bi_len, (rgrp_block - (bits-bi_start*GFS_NBBY)), state); diff --git a/gfs/libgfs/fs_dir.c b/gfs/libgfs/fs_dir.c index 0526fa6..0d704d4 100644 --- a/gfs/libgfs/fs_dir.c +++ b/gfs/libgfs/fs_dir.c @@ -2,7 +2,7 @@ #include link.h #include libgfs.h -#define dir_hash(qstr) (gfs_dir_hash((qstr)-name, (qstr)-len)) +#define dir_hash(qstr) (gfs_dir_hash((char *)(qstr)-name, (qstr)-len)) /* Detect directory is a stuffed inode */ int gfs_inode_is_stuffed(struct gfs_inode *ip) @@ -144,7 +144,7 @@ int dirent_del(int disk_fd, struct gfs_inode *dip, osi_buf_t *bh, return -1; } - if((char *)cur + cur_rec_len BH_DATA(bh) + BH_SIZE(bh)){ + if((char *)(cur) + cur_rec_len BH_DATA(bh) + BH_SIZE(bh)){ log_err(dirent_del: Directory entry has record length longer than buffer.\n); return -1; @@ -444,7 +444,7 @@ static int linked_leaf_search(int disk_fd, struct gfs_inode *dip, static int dir_e_search(int disk_fd, struct gfs_inode *dip, identifier_t *id, unsigned int *type) { - osi_buf_t *bh; + osi_buf_t *bh = NULL; struct gfs_dirent *dent; int error; diff --git a/gfs/libgfs/fs_inode.c b/gfs/libgfs/fs_inode.c index 1590364..51f6e9b 100644 --- a/gfs/libgfs/fs_inode.c +++ b/gfs/libgfs/fs_inode.c @@ -371,7 +371,7 @@ int fs_mkdir(int disk_fd, struct gfs_inode *dip, char *new_dir, osi_filename_t name; int new; - name.name = new_dir; + name.name = (unsigned char *)new_dir; name.len = strlen(new_dir); creds.cr_uid = getuid(); creds.cr_gid = getgid(); diff --git a/gfs/libgfs/log.c b/gfs/libgfs/log.c index 977e25b..52e0942 100644 --- a/gfs/libgfs/log.c +++ b/gfs/libgfs/log.c @@ -98,7 +98,7 @@ int query(struct options *opts, const char *format, ...) log_debug(Error in select() on stdin\n); break; } - read(STDIN_FILENO, response, sizeof(char)); + err = read(STDIN_FILENO, response, sizeof(char)); } query: @@ -108,7 +108,7 @@ int query(struct options *opts, const char *format, ...) fflush(NULL); rescan: -
[Cluster-devel] Cluster Project branch, STABLE2, updated. cluster-2.03.04-7-gee9f0a2
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=ee9f0a2680427a8ed0ba4da0bacd03f80495f00f The branch, STABLE2 has been updated via ee9f0a2680427a8ed0ba4da0bacd03f80495f00f (commit) from e7ef9a9554bb7ffa4d5f280f48259b2c3507bff1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit ee9f0a2680427a8ed0ba4da0bacd03f80495f00f Author: Bob Peterson [EMAIL PROTECTED] Date: Thu Jun 12 11:15:08 2008 -0500 Fix gfs_debug build warning --- Summary of changes: gfs/gfs_debug/readfile.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gfs/gfs_debug/readfile.c b/gfs/gfs_debug/readfile.c index b26c00b..d1de13e 100644 --- a/gfs/gfs_debug/readfile.c +++ b/gfs/gfs_debug/readfile.c @@ -161,7 +161,7 @@ readfile(void) char *data; char buf[CHUNKSIZE]; uint64_t o = 0; - int error; + int error, rc; must_be_gfs(); @@ -182,7 +182,7 @@ readfile(void) error = gfs_readi(di, buf, o, CHUNKSIZE); if (error = 0) break; - write(STDOUT_FILENO, buf, error); + rc = write(STDOUT_FILENO, buf, error); o += error; } } hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, master, updated. cluster-2.99.04-19-g3c6491f
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=3c6491fb69663681d0ed0fc9ec897336048bf168 The branch, master has been updated via 3c6491fb69663681d0ed0fc9ec897336048bf168 (commit) from 33eb5724d102b7db2d5370623343ae2e74d46edb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 3c6491fb69663681d0ed0fc9ec897336048bf168 Author: Bob Peterson [EMAIL PROTECTED] Date: Thu Jun 12 11:15:08 2008 -0500 Fix gfs_debug build warning --- Summary of changes: gfs/gfs_debug/readfile.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gfs/gfs_debug/readfile.c b/gfs/gfs_debug/readfile.c index b26c00b..d1de13e 100644 --- a/gfs/gfs_debug/readfile.c +++ b/gfs/gfs_debug/readfile.c @@ -161,7 +161,7 @@ readfile(void) char *data; char buf[CHUNKSIZE]; uint64_t o = 0; - int error; + int error, rc; must_be_gfs(); @@ -182,7 +182,7 @@ readfile(void) error = gfs_readi(di, buf, o, CHUNKSIZE); if (error = 0) break; - write(STDOUT_FILENO, buf, error); + rc = write(STDOUT_FILENO, buf, error); o += error; } } hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, master, updated. cluster-2.99.04-20-gbad45f8
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=bad45f88207f1586eee6270f030f51527da7c79a The branch, master has been updated via bad45f88207f1586eee6270f030f51527da7c79a (commit) from 3c6491fb69663681d0ed0fc9ec897336048bf168 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit bad45f88207f1586eee6270f030f51527da7c79a Author: Bob Peterson [EMAIL PROTECTED] Date: Thu Jun 12 12:11:28 2008 -0500 Ignoring gets return value in gfs_mkfs --- Summary of changes: gfs/gfs_mkfs/main.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/gfs/gfs_mkfs/main.c b/gfs/gfs_mkfs/main.c index 3027d06..0dc75b4 100644 --- a/gfs/gfs_mkfs/main.c +++ b/gfs/gfs_mkfs/main.c @@ -221,9 +221,7 @@ void are_you_sure(commandline_t *comline) vid-usage_id == VOLUME_ID_OTHER? partition : vid-usage); volume_id_close(vid); printf(\nAre you sure you want to proceed? [y/n] ); - fgets(input, 32, stdin); - - if (input[0] != 'y') + if (fgets(input, 32, stdin) == NULL || input[0] != 'y') die(aborted\n); else printf(\n); hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, STABLE2, updated. cluster-2.03.04-8-gd6e657e
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=d6e657e2882ac2fa89567c87189c3bbc49902f06 The branch, STABLE2 has been updated via d6e657e2882ac2fa89567c87189c3bbc49902f06 (commit) from ee9f0a2680427a8ed0ba4da0bacd03f80495f00f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit d6e657e2882ac2fa89567c87189c3bbc49902f06 Author: Bob Peterson [EMAIL PROTECTED] Date: Thu Jun 12 12:11:28 2008 -0500 Ignoring gets return value in gfs_mkfs --- Summary of changes: gfs/gfs_mkfs/main.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/gfs/gfs_mkfs/main.c b/gfs/gfs_mkfs/main.c index 3027d06..0dc75b4 100644 --- a/gfs/gfs_mkfs/main.c +++ b/gfs/gfs_mkfs/main.c @@ -221,9 +221,7 @@ void are_you_sure(commandline_t *comline) vid-usage_id == VOLUME_ID_OTHER? partition : vid-usage); volume_id_close(vid); printf(\nAre you sure you want to proceed? [y/n] ); - fgets(input, 32, stdin); - - if (input[0] != 'y') + if (fgets(input, 32, stdin) == NULL || input[0] != 'y') die(aborted\n); else printf(\n); hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, master, updated. cluster-2.99.04-21-gb1e2d32
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=b1e2d32853cf569e363ef8b8f71fbdc5eda36aec The branch, master has been updated via b1e2d32853cf569e363ef8b8f71fbdc5eda36aec (commit) from bad45f88207f1586eee6270f030f51527da7c79a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit b1e2d32853cf569e363ef8b8f71fbdc5eda36aec Author: Bob Peterson [EMAIL PROTECTED] Date: Thu Jun 12 13:42:27 2008 -0500 Fix gfs_tool build warnings --- Summary of changes: gfs/gfs_tool/counters.c |2 +- gfs/gfs_tool/main.c |2 +- gfs/gfs_tool/misc.c |6 ++ gfs/gfs_tool/sb.c | 11 +-- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/gfs/gfs_tool/counters.c b/gfs/gfs_tool/counters.c index f0da2df..641428a 100644 --- a/gfs/gfs_tool/counters.c +++ b/gfs/gfs_tool/counters.c @@ -186,7 +186,7 @@ print_counters(int argc, char **argv) die(can't get counters: %s\n, strerror(errno)); if (debug) - write(STDOUT_FILENO, data, error); + error = write(STDOUT_FILENO, data, error); parse_lines(data, error); diff --git a/gfs/gfs_tool/main.c b/gfs/gfs_tool/main.c index d71373f..3de8580 100644 --- a/gfs/gfs_tool/main.c +++ b/gfs/gfs_tool/main.c @@ -110,7 +110,7 @@ print_usage(void) int x; for (x = 0; usage[x][0]; x++) - printf(usage[x]); + printf(%s, usage[x]); } /** diff --git a/gfs/gfs_tool/misc.c b/gfs/gfs_tool/misc.c index 2ec3ca6..bd699f2 100644 --- a/gfs/gfs_tool/misc.c +++ b/gfs/gfs_tool/misc.c @@ -158,7 +158,7 @@ print_lockdump(int argc, char **argv) close(fd); - write(STDOUT_FILENO, data, count); + x = write(STDOUT_FILENO, data, count); free(data); } @@ -640,9 +640,7 @@ reclaim_metadata(int argc, char **argv) if (!override) { printf(Don't do this if this file system is being exported by NFS (on any machine).\n); printf(\nAre you sure you want to proceed? [y/n] ); - fgets(buf, 255, stdin); - - if (buf[0] != 'y') + if (fgets(buf, 255, stdin) == NULL || buf[0] != 'y') die(aborted\n); printf(\n); diff --git a/gfs/gfs_tool/sb.c b/gfs/gfs_tool/sb.c index 9a999f4..130e039 100644 --- a/gfs/gfs_tool/sb.c +++ b/gfs/gfs_tool/sb.c @@ -48,7 +48,8 @@ do_sb(int argc, char **argv) { char *device, *field, *newval = NULL; int fd; - unsigned char buf[GFS_BASIC_BLOCK], input[256]; + unsigned char buf[GFS_BASIC_BLOCK]; + char input[256]; struct gfs_sb sb; if (optind == argc) @@ -75,9 +76,7 @@ do_sb(int argc, char **argv) if (newval !override) { printf(You shouldn't change any of these values if the filesystem is mounted.\n); printf(\nAre you sure? [y/n] ); - fgets(input, 255, stdin); - - if (input[0] != 'y') + if (fgets(input, 255, stdin) == NULL || input[0] != 'y') die(aborted\n); printf(\n); @@ -86,7 +85,7 @@ do_sb(int argc, char **argv) do_lseek(fd, GFS_SB_ADDR * GFS_BASIC_BLOCK); do_read(fd, buf, GFS_BASIC_BLOCK); - gfs_sb_in(sb, buf); + gfs_sb_in(sb, (char *)buf); if (sb.sb_header.mh_magic != GFS_MAGIC || sb.sb_header.mh_type != GFS_METATYPE_SB) @@ -139,7 +138,7 @@ do_sb(int argc, char **argv) die(unknown field %s\n, field); if (newval) { - gfs_sb_out(sb, buf); + gfs_sb_out(sb, (char *)buf); do_lseek(fd, GFS_SB_ADDR * GFS_BASIC_BLOCK); do_write(fd, buf, GFS_BASIC_BLOCK); hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, STABLE2, updated. cluster-2.03.04-10-gb88fc67
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=b88fc67061456f976f1f19c079cc2d59ba158f1b The branch, STABLE2 has been updated via b88fc67061456f976f1f19c079cc2d59ba158f1b (commit) from 62b847a636ea65b080f3a8b203384a2c5a18de25 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit b88fc67061456f976f1f19c079cc2d59ba158f1b Author: Bob Peterson [EMAIL PROTECTED] Date: Thu Jun 12 15:03:02 2008 -0500 Fix gfs_fsck build warnings --- Summary of changes: gfs/gfs_fsck/fs_bits.c | 13 +++-- gfs/gfs_fsck/fs_dir.c |4 ++-- gfs/gfs_fsck/fs_inode.c |2 +- gfs/gfs_fsck/log.c |8 gfs/gfs_fsck/main.c | 18 ++ gfs/gfs_fsck/pass2.c|4 ++-- gfs/gfs_fsck/pass5.c|4 ++-- gfs/gfs_fsck/rgrp.c |4 +++- gfs/gfs_fsck/super.c| 17 + gfs/gfs_fsck/util.c |6 +++--- 10 files changed, 43 insertions(+), 37 deletions(-) diff --git a/gfs/gfs_fsck/fs_bits.c b/gfs/gfs_fsck/fs_bits.c index 9c027a2..848931f 100644 --- a/gfs/gfs_fsck/fs_bits.c +++ b/gfs/gfs_fsck/fs_bits.c @@ -280,8 +280,8 @@ int fs_get_bitmap(struct fsck_sb *sdp, uint64 blkno, struct fsck_rgrp *rgd){ return -1; } - byte = (BH_DATA(rgd-rd_bh[buf]) + bits-bi_offset) + - (rgrp_block/GFS_NBBY - bits-bi_start); + byte = (unsigned char *)((BH_DATA(rgd-rd_bh[buf]) + bits-bi_offset) + +(rgrp_block/GFS_NBBY - bits-bi_start)); bit = (rgrp_block % GFS_NBBY) * GFS_BIT_SIZE; val = ((*byte bit) GFS_BIT_MASK); @@ -335,10 +335,11 @@ int fs_set_bitmap(struct fsck_sb *sdp, uint64 blkno, int state){ } } if (buf rgd-rd_ri.ri_length) { - fs_setbit(BH_DATA(rgd-rd_bh[buf]) + bits-bi_offset, - bits-bi_len, - (rgrp_block - (bits-bi_start*GFS_NBBY)), - state); + fs_setbit((unsigned char *)BH_DATA(rgd-rd_bh[buf]) + + bits-bi_offset, + bits-bi_len, + (rgrp_block - (bits-bi_start*GFS_NBBY)), + state); if(write_buf(sdp, rgd-rd_bh[buf], 0)){ fs_rgrp_relse(rgd); return -1; diff --git a/gfs/gfs_fsck/fs_dir.c b/gfs/gfs_fsck/fs_dir.c index 2d12cbb..399575e 100644 --- a/gfs/gfs_fsck/fs_dir.c +++ b/gfs/gfs_fsck/fs_dir.c @@ -12,7 +12,7 @@ #define IS_LEAF (1) #define IS_DINODE (2) -#define dir_hash(qstr) (gfs_dir_hash((qstr)-name, (qstr)-len)) +#define dir_hash(qstr) (gfs_dir_hash((char *)(qstr)-name, (qstr)-len)) /* Detect directory is a stuffed inode */ int fsck_inode_is_stuffed(struct fsck_inode *ip) @@ -451,7 +451,7 @@ static int linked_leaf_search(struct fsck_inode *dip, identifier_t *id, */ static int dir_e_search(struct fsck_inode *dip, identifier_t *id, unsigned int *type) { - osi_buf_t *bh; + osi_buf_t *bh = NULL; struct gfs_dirent *dent; int error; diff --git a/gfs/gfs_fsck/fs_inode.c b/gfs/gfs_fsck/fs_inode.c index b960025..828f092 100644 --- a/gfs/gfs_fsck/fs_inode.c +++ b/gfs/gfs_fsck/fs_inode.c @@ -503,7 +503,7 @@ int fs_mkdir(struct fsck_inode *dip, char *new_dir, int mode, struct fsck_inode osi_filename_t name; int new; - name.name = new_dir; + name.name = (unsigned char *)new_dir; name.len = strlen(new_dir); creds.cr_uid = getuid(); creds.cr_gid = getgid(); diff --git a/gfs/gfs_fsck/log.c b/gfs/gfs_fsck/log.c index 94a2ca6..9c89683 100644 --- a/gfs/gfs_fsck/log.c +++ b/gfs/gfs_fsck/log.c @@ -104,7 +104,7 @@ int query(struct fsck_sb *sbp, const char *format, ...) log_debug(Error in select() on stdin\n); break; } - read(STDIN_FILENO, response, sizeof(char)); + err = read(STDIN_FILENO, response, sizeof(char)); } query: @@ -114,7 +114,7 @@ int query(struct fsck_sb *sbp, const char *format, ...) fflush(NULL); rescan: - read(STDIN_FILENO, response, sizeof(char)); + err = read(STDIN_FILENO, response, sizeof(char)); if(tolower(response) == 'y') { ret = 1; @@ -124,7 +124,7 @@ int query(struct fsck_sb *sbp, const char *format, ...) goto rescan; } else { while(response != '\n') -
[Cluster-devel] Cluster Project branch, STABLE2, updated. cluster-2.03.04-1-g5f3baac
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=5f3baac6a84cc3cf78061a799325eb2102e209a6 The branch, STABLE2 has been updated via 5f3baac6a84cc3cf78061a799325eb2102e209a6 (commit) from 4ce57de84bf434983af8c6c352cecc5d78806808 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 5f3baac6a84cc3cf78061a799325eb2102e209a6 Author: Bob Peterson [EMAIL PROTECTED] Date: Wed Jun 11 13:55:00 2008 -0500 Added an optional block-size to mkfs.gfs2 --- Summary of changes: gfs2/man/mkfs.gfs2.8 | 11 --- gfs2/mkfs/main_mkfs.c | 29 - 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/gfs2/man/mkfs.gfs2.8 b/gfs2/man/mkfs.gfs2.8 index 4bb726c..279c12f 100644 --- a/gfs2/man/mkfs.gfs2.8 +++ b/gfs2/man/mkfs.gfs2.8 @@ -5,7 +5,7 @@ mkfs.gfs2 - Make a GFS2 filesystem .SH SYNOPSIS .B mkfs.gfs2 -[\fIOPTION\fR]... \fIDEVICE\fR +[\fIOPTION\fR]... \fIDEVICE\fR \fI[ block-count ]\fR .SH DESCRIPTION mkfs.gfs2 is used to create a Global File System. @@ -20,7 +20,7 @@ x86_64, s390, s390x), the memory page size is 4096 bytes. On other architectures it may be bigger. The default block size is 4096 bytes. In general, GFS2 filesystems should not deviate from the default value. .TP -\fB-c MegaBytes\fP +\fB-c\fP \fIMegaBytes\fR Initial size of each journal's quota change file .TP \fB-D\fP @@ -70,12 +70,17 @@ Fsname is a unique file system name used to distinguish this GFS2 file system from others created (1 to 16 characters). Lock_nolock doesn't use this field. .TP -\fB-u MegaBytes\fP +\fB-u\fP \fIMegaBytes\fR Initial size of each journal's unlinked tag file .TP \fB-V\fP Print program version information, then exit. +.TP +[ \fIblock-count\fR ] +Make the file system this many blocks in size. If not specified, the +entire length of the specified device is used. + .SH EXAMPLE .TP gfs2_mkfs -t mycluster:mygfs2 -p lock_dlm -j 2 /dev/vg0/mygfs2 diff --git a/gfs2/mkfs/main_mkfs.c b/gfs2/mkfs/main_mkfs.c index 8a2059a..38af2b9 100644 --- a/gfs2/mkfs/main_mkfs.c +++ b/gfs2/mkfs/main_mkfs.c @@ -42,7 +42,7 @@ print_usage(void) { printf(Usage:\n); printf(\n); - printf(%s [options] device\n, prog_name); + printf(%s [options] device [ block-count ]\n, prog_name); printf(\n); printf(Options:\n); printf(\n); @@ -77,6 +77,7 @@ decode_arguments(int argc, char *argv[], struct gfs2_sbd *sdp) memset(sdp-device_name, 0, sizeof(sdp-device_name)); sdp-md.journals = 1; + sdp-orig_fssize = 0; while (cont) { optchar = getopt(argc, argv, -b:c:DhJ:j:Op:qr:t:u:VX); @@ -160,10 +161,13 @@ decode_arguments(int argc, char *argv[], struct gfs2_sbd *sdp) case 1: if (strcmp(optarg, gfs2) == 0) continue; - if (sdp-device_name[0]) { - die(More than one device specified (try -h for help)); - } - strcpy(sdp-device_name, optarg); + if (!sdp-device_name[0]) + strcpy(sdp-device_name, optarg); + else if (!sdp-orig_fssize +isdigit(optarg[0])) + sdp-orig_fssize = atol(optarg); + else + die(More than one device specified (try -h for help)\n); break; default: @@ -179,6 +183,9 @@ decode_arguments(int argc, char *argv[], struct gfs2_sbd *sdp) die(no device specified (try -h for help)\n); if (optind argc) + sdp-orig_fssize = atol(argv[optind++]); + + if (optind argc) die(Unrecognized argument: %s\n, argv[optind]); if (sdp-debug) { @@ -197,6 +204,9 @@ decode_arguments(int argc, char *argv[], struct gfs2_sbd *sdp) printf( table = %s\n, sdp-locktable); printf( utsize = %u\n, sdp-utsize); printf( device = %s\n, sdp-device_name); + if (sdp-orig_fssize) + printf( block-count = %llu\n, + (unsigned long long)sdp-orig_fssize); } } @@ -390,6 +400,15 @@ main_mkfs(int argc, char *argv[]) /* Get the device geometry */ device_geometry(sdp); + /* Convert optional block-count to basic blocks */ + if (sdp-orig_fssize) { +
[Cluster-devel] Cluster Project branch, master, updated. cluster-2.99.04-6-g05b3793
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=05b3793aa23b44f2c4c6e139f8fa3658eb6db311 The branch, master has been updated via 05b3793aa23b44f2c4c6e139f8fa3658eb6db311 (commit) via cc3c26a4fef64eaee072ff62f4bb6194a6c2fa3d (commit) via 4b6c6cc589ef333235316f5813ef47cbe3e2b360 (commit) from 4af22a3b269b517a542e38aaec5092cb2fcf202f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 05b3793aa23b44f2c4c6e139f8fa3658eb6db311 Author: Bob Peterson [EMAIL PROTECTED] Date: Mon Jun 9 14:13:08 2008 -0500 Fix compiler warning. commit cc3c26a4fef64eaee072ff62f4bb6194a6c2fa3d Author: Bob Peterson [EMAIL PROTECTED] Date: Mon Jun 9 13:52:50 2008 -0500 Ability to specify starting block or structure with -s commit 4b6c6cc589ef333235316f5813ef47cbe3e2b360 Author: Bob Peterson [EMAIL PROTECTED] Date: Mon Jun 9 13:37:45 2008 -0500 Allow keywords in block number input --- Summary of changes: gfs2/edit/hexedit.c | 228 - gfs2/edit/hexedit.h |1 + gfs2/man/gfs2_edit.8 |7 ++- 3 files changed, 119 insertions(+), 117 deletions(-) diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c index 080daf4..99af162 100644 --- a/gfs2/edit/hexedit.c +++ b/gfs2/edit/hexedit.c @@ -712,6 +712,30 @@ void gfs_rgrp_print(struct gfs_rgrp *rg) } /* */ +/* get_rg_addr */ +/* */ +uint64_t get_rg_addr(int rgnum) +{ + struct gfs2_buffer_head *bh; + uint64_t rgblk = 0, block; + struct gfs2_inode *riinode; + + if (gfs1) + block = sbd1-sb_rindex_di.no_addr; + else + block = masterblock(rindex); + bh = bread(sbd, block); + riinode = inode_get(sbd, bh); + if (rgnum riinode-i_di.di_size / risize()) + rgblk = find_rgrp_block(riinode, rgnum); + else + fprintf(stderr, Error: File system only has %lld RGs.\n, + riinode-i_di.di_size / risize()); + inode_put(riinode, not_updated); + return rgblk; +} + +/* */ /* set_rgrp_flags - Set an rgrp's flags to a given value*/ /* rgnum: which rg to print or modify flags for (0 - X) */ /* new_flags: value to set new rg_flags to (if modify == TRUE) */ @@ -724,24 +748,10 @@ void set_rgrp_flags(int rgnum, uint32_t new_flags, int modify, int full) struct gfs2_rgrp rg2; struct gfs_rgrp rg1; } rg; - struct gfs2_buffer_head *bh, *ribh; - uint64_t rgblk, block; - struct gfs2_inode *riinode; + struct gfs2_buffer_head *bh; + uint64_t rgblk; - if (gfs1) - block = sbd1-sb_rindex_di.no_addr; - else - block = masterblock(rindex); - ribh = bread(sbd, block); - riinode = inode_get(sbd, ribh); - if (rgnum = riinode-i_di.di_size / risize()) { - fprintf(stderr, Error: File system only has %lld RGs.\n, - riinode-i_di.di_size / risize()); - inode_put(riinode, not_updated); - brelse(ribh, not_updated); - return; - } - rgblk = find_rgrp_block(riinode, rgnum); + rgblk = get_rg_addr(rgnum); bh = bread(sbd, rgblk); if (gfs1) gfs_rgrp_in(rg.rg1, bh-b_data); @@ -773,7 +783,6 @@ void set_rgrp_flags(int rgnum, uint32_t new_flags, int modify, int full) (unsigned long long)rgblk, rg.rg2.rg_flags); brelse(bh, not_updated); } - inode_put(riinode, not_updated); if (modify) bsync(sbd); } @@ -1621,6 +1630,65 @@ uint64_t pop_block(void) } /* */ +/* Check if the word is a keyword such as sb or rindex */ +/* Returns: block number if it is, else 0 */ +/* */ +uint64_t check_keywords(const char *kword) +{ + uint64_t blk = 0; + + if (!strcmp(kword, sb) ||!strcmp(kword, superblock)) + blk = 0x10 * (4096 / sbd.bsize); /* superblock */ + else if (!strcmp(kword,
[Cluster-devel] Cluster Project branch, master, updated. cluster-2.99.03-9-g975ce1c
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=975ce1c9f317882e782126ff742703991495fc8b The branch, master has been updated via 975ce1c9f317882e782126ff742703991495fc8b (commit) via f31be740f86d6b60cb9e6f8ab9b1673b4f05355d (commit) via 23b0fde400ab75dea7c9c38e63d7db591b3ffe58 (commit) from 61ac9778debcac15145f4b061af450b809089908 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 975ce1c9f317882e782126ff742703991495fc8b Author: Bob Peterson [EMAIL PROTECTED] Date: Wed Jun 4 14:33:30 2008 -0500 Updates to gfs2_edit man page for new option. commit f31be740f86d6b60cb9e6f8ab9b1673b4f05355d Author: Bob Peterson [EMAIL PROTECTED] Date: Wed Jun 4 14:26:48 2008 -0500 Make gfs2_edit more friendly to automated testing. commit 23b0fde400ab75dea7c9c38e63d7db591b3ffe58 Author: Bob Peterson [EMAIL PROTECTED] Date: Wed Jun 4 14:24:05 2008 -0500 Fix gfs2_edit bugs with non-4K block sizes --- Summary of changes: gfs2/edit/gfs2hex.c | 13 ++--- gfs2/edit/hexedit.c | 141 +++-- gfs2/edit/hexedit.h |1 - gfs2/edit/savemeta.c | 58 ++-- gfs2/man/gfs2_edit.8 |4 ++ 5 files changed, 128 insertions(+), 89 deletions(-) diff --git a/gfs2/edit/gfs2hex.c b/gfs2/edit/gfs2hex.c index 7262d78..082f5b6 100644 --- a/gfs2/edit/gfs2hex.c +++ b/gfs2/edit/gfs2hex.c @@ -38,7 +38,6 @@ extern struct gfs2_sb sb; extern char *buf; extern struct gfs2_dinode di; -extern uint64_t bufsize; extern int line, termlines; extern char edit_fmt[80]; extern char estring[1024]; @@ -226,7 +225,7 @@ void do_dinode_extended(struct gfs2_dinode *di, char *buf) memset(indirect, 0, sizeof(indirect)); if (di-di_height 0) { /* Indirect pointers */ - for (x = sizeof(struct gfs2_dinode); x bufsize; + for (x = sizeof(struct gfs2_dinode); x sbd.bsize; x += sizeof(uint64_t)) { p = be64_to_cpu(*(uint64_t *)(buf + x)); if (p) { @@ -243,7 +242,7 @@ void do_dinode_extended(struct gfs2_dinode *di, char *buf) indirect-ii[0].dirents = 0; indirect-ii[0].block = block; indirect-ii[0].is_dir = TRUE; - for (x = sizeof(struct gfs2_dinode); x bufsize; x += skip) { + for (x = sizeof(struct gfs2_dinode); x sbd.bsize; x += skip) { skip = indirect_dirent(indirect-ii, buf + x, indirect-ii[0].dirents); @@ -275,7 +274,7 @@ void do_dinode_extended(struct gfs2_dinode *di, char *buf) gfs2_leaf_in(leaf, tmp_bh-b_data); indirect-ii[indirect_blocks].dirents = 0; for (direntcount = 0, bufoffset = sizeof(struct gfs2_leaf); -bufoffset bufsize; +bufoffset sbd.bsize; direntcount++, bufoffset += skip) { skip = indirect_dirent(indirect-ii[indirect_blocks], tmp_bh-b_data + bufoffset, @@ -317,7 +316,7 @@ int do_indirect_extended(char *buf, struct iinfo *iinf) memset(iinf, 0, sizeof(struct iinfo)); for (x = (gfs1 ? sizeof(struct gfs_indirect): sizeof(struct gfs2_meta_header)), y = 0; -x bufsize; +x sbd.bsize; x += sizeof(uint64_t), y++) { p = be64_to_cpu(*(uint64_t *)(buf + x)); if (p) { @@ -352,7 +351,7 @@ void do_leaf_extended(char *buf, struct iinfo *indir) x = 0; memset(indir, 0, sizeof(indir)); /* Directory Entries: */ - for (i = sizeof(struct gfs2_leaf); i bufsize; + for (i = sizeof(struct gfs2_leaf); i sbd.bsize; i += de.de_rec_len) { gfs2_dirent_in(de, buf + i); if (de.de_inum.no_addr) { @@ -399,7 +398,7 @@ void do_eattr_extended(char *buf) print_gfs2(Eattr Entries:); eol(0); - for (x = sizeof(struct gfs2_meta_header); x bufsize; x += ea.ea_rec_len) + for (x = sizeof(struct gfs2_meta_header); x sbd.bsize; x += ea.ea_rec_len) { eol(0); gfs2_ea_header_in(ea, buf + x); diff
[Cluster-devel] Cluster Project branch, STABLE2, updated. cluster-2.03.03-7-gf21cbeb
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=f21cbeb482fad5eab16e2f14dc65dcd07d1afcaf The branch, STABLE2 has been updated via f21cbeb482fad5eab16e2f14dc65dcd07d1afcaf (commit) via d0fa71839be16af2f82b3bc8129f1ec0639fb6e5 (commit) via 77bf8a9c23b46f93b9a1bf8b80146002694c6750 (commit) from ab51857c0232d079ddbd8ec0a3b9c4c8a7faa645 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit f21cbeb482fad5eab16e2f14dc65dcd07d1afcaf Author: Bob Peterson [EMAIL PROTECTED] Date: Wed Jun 4 14:33:30 2008 -0500 Updates to gfs2_edit man page for new option. commit d0fa71839be16af2f82b3bc8129f1ec0639fb6e5 Author: Bob Peterson [EMAIL PROTECTED] Date: Wed Jun 4 14:26:48 2008 -0500 Make gfs2_edit more friendly to automated testing. commit 77bf8a9c23b46f93b9a1bf8b80146002694c6750 Author: Bob Peterson [EMAIL PROTECTED] Date: Wed Jun 4 14:24:05 2008 -0500 Fix gfs2_edit bugs with non-4K block sizes --- Summary of changes: gfs2/edit/gfs2hex.c | 13 ++--- gfs2/edit/hexedit.c | 141 +++-- gfs2/edit/hexedit.h |1 - gfs2/edit/savemeta.c | 58 ++-- gfs2/man/gfs2_edit.8 |4 ++ 5 files changed, 128 insertions(+), 89 deletions(-) diff --git a/gfs2/edit/gfs2hex.c b/gfs2/edit/gfs2hex.c index 7262d78..082f5b6 100644 --- a/gfs2/edit/gfs2hex.c +++ b/gfs2/edit/gfs2hex.c @@ -38,7 +38,6 @@ extern struct gfs2_sb sb; extern char *buf; extern struct gfs2_dinode di; -extern uint64_t bufsize; extern int line, termlines; extern char edit_fmt[80]; extern char estring[1024]; @@ -226,7 +225,7 @@ void do_dinode_extended(struct gfs2_dinode *di, char *buf) memset(indirect, 0, sizeof(indirect)); if (di-di_height 0) { /* Indirect pointers */ - for (x = sizeof(struct gfs2_dinode); x bufsize; + for (x = sizeof(struct gfs2_dinode); x sbd.bsize; x += sizeof(uint64_t)) { p = be64_to_cpu(*(uint64_t *)(buf + x)); if (p) { @@ -243,7 +242,7 @@ void do_dinode_extended(struct gfs2_dinode *di, char *buf) indirect-ii[0].dirents = 0; indirect-ii[0].block = block; indirect-ii[0].is_dir = TRUE; - for (x = sizeof(struct gfs2_dinode); x bufsize; x += skip) { + for (x = sizeof(struct gfs2_dinode); x sbd.bsize; x += skip) { skip = indirect_dirent(indirect-ii, buf + x, indirect-ii[0].dirents); @@ -275,7 +274,7 @@ void do_dinode_extended(struct gfs2_dinode *di, char *buf) gfs2_leaf_in(leaf, tmp_bh-b_data); indirect-ii[indirect_blocks].dirents = 0; for (direntcount = 0, bufoffset = sizeof(struct gfs2_leaf); -bufoffset bufsize; +bufoffset sbd.bsize; direntcount++, bufoffset += skip) { skip = indirect_dirent(indirect-ii[indirect_blocks], tmp_bh-b_data + bufoffset, @@ -317,7 +316,7 @@ int do_indirect_extended(char *buf, struct iinfo *iinf) memset(iinf, 0, sizeof(struct iinfo)); for (x = (gfs1 ? sizeof(struct gfs_indirect): sizeof(struct gfs2_meta_header)), y = 0; -x bufsize; +x sbd.bsize; x += sizeof(uint64_t), y++) { p = be64_to_cpu(*(uint64_t *)(buf + x)); if (p) { @@ -352,7 +351,7 @@ void do_leaf_extended(char *buf, struct iinfo *indir) x = 0; memset(indir, 0, sizeof(indir)); /* Directory Entries: */ - for (i = sizeof(struct gfs2_leaf); i bufsize; + for (i = sizeof(struct gfs2_leaf); i sbd.bsize; i += de.de_rec_len) { gfs2_dirent_in(de, buf + i); if (de.de_inum.no_addr) { @@ -399,7 +398,7 @@ void do_eattr_extended(char *buf) print_gfs2(Eattr Entries:); eol(0); - for (x = sizeof(struct gfs2_meta_header); x bufsize; x += ea.ea_rec_len) + for (x = sizeof(struct gfs2_meta_header); x sbd.bsize; x += ea.ea_rec_len) { eol(0); gfs2_ea_header_in(ea, buf + x);
[Cluster-devel] Cluster Project branch, master, updated. cluster-2.99.02-7-ga39f90d
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=a39f90d61f39bf34fdf65003a52d90bbca007913 The branch, master has been updated via a39f90d61f39bf34fdf65003a52d90bbca007913 (commit) from 98a463770c8ad16ad9d5b10da5a7252a136c1716 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit a39f90d61f39bf34fdf65003a52d90bbca007913 Author: Bob Peterson [EMAIL PROTECTED] Date: Tue May 20 09:37:53 2008 -0500 bz 446085: Back-port faster bitfit algorithm from gfs2 for better performance. --- Summary of changes: gfs-kernel/src/gfs/bits.c | 85 +++- gfs-kernel/src/gfs/bits.h |3 +- gfs-kernel/src/gfs/rgrp.c |3 +- 3 files changed, 62 insertions(+), 29 deletions(-) diff --git a/gfs-kernel/src/gfs/bits.c b/gfs-kernel/src/gfs/bits.c index da08a23..55427bb 100644 --- a/gfs-kernel/src/gfs/bits.c +++ b/gfs-kernel/src/gfs/bits.c @@ -31,6 +31,16 @@ #include gfs.h #include bits.h +#if BITS_PER_LONG == 32 +#define LBITMASK (0xUL) +#define LBITSKIP55 (0xUL) +#define LBITSKIP00 (0xUL) +#else +#define LBITMASK (0xUL) +#define LBITSKIP55 (0xUL) +#define LBITSKIP00 (0xUL) +#endif + static const char valid_change[16] = { /* current */ /* n */ 0, 1, 1, 1, @@ -115,41 +125,66 @@ gfs_testbit(struct gfs_rgrpd *rgd, */ uint32_t -gfs_bitfit(struct gfs_rgrpd *rgd, - unsigned char *buffer, unsigned int buflen, +gfs_bitfit(unsigned char *buffer, unsigned int buflen, uint32_t goal, unsigned char old_state) { - unsigned char *byte, *end, alloc; - uint32_t blk = goal; - unsigned int bit; - - byte = buffer + (goal / GFS_NBBY); - bit = (goal % GFS_NBBY) * GFS_BIT_SIZE; - end = buffer + buflen; - alloc = (old_state 1) ? 0 : 0x55; - + const u8 *byte, *start, *end; + int bit, startbit; + u32 g1, g2, misaligned; + unsigned long *plong; + unsigned long lskipval; + + lskipval = (old_state GFS_BLKST_USED) ? LBITSKIP00 : LBITSKIP55; + g1 = (goal / GFS_NBBY); + start = buffer + g1; + byte = start; +end = buffer + buflen; + g2 = ALIGN(g1, sizeof(unsigned long)); + plong = (unsigned long *)(buffer + g2); + startbit = bit = (goal % GFS_NBBY) * GFS_BIT_SIZE; + misaligned = g2 - g1; + if (!misaligned) + goto ulong_aligned; +/* parse the bitmap a byte at a time */ +misaligned: while (byte end) { - if ((*byte 0x55) == alloc) { - blk += (8 - bit) 1; - - bit = 0; - byte++; - - continue; + if (((*byte bit) GFS_BIT_MASK) == old_state) { + return goal + + (((byte - start) * GFS_NBBY) + +((bit - startbit) 1)); } - - if (((*byte bit) GFS_BIT_MASK) == old_state) - return blk; - bit += GFS_BIT_SIZE; - if (bit = 8) { + if (bit = GFS_NBBY * GFS_BIT_SIZE) { bit = 0; byte++; + misaligned--; + if (!misaligned) { + plong = (unsigned long *)byte; + goto ulong_aligned; + } } - - blk++; } + return BFITNOENT; +/* parse the bitmap a unsigned long at a time */ +ulong_aligned: + /* Stop at end - 1 or else prefetch can go past the end and segfault. + We could if it but we'd lose some of the performance gained. + This way will only slow down searching the very last 4/8 bytes + depending on architecture. I've experimented with several ways + of writing this section such as using an else before the goto + but this one seems to be the fastest. */ + while ((unsigned char *)plong end - 1) { + prefetch(plong + 1); + if (((*plong) LBITMASK) != lskipval) + break; + plong++; + } + if ((unsigned char *)plong end) { + byte = (const u8 *)plong; + misaligned += sizeof(unsigned long) - 1; + goto misaligned; + } return BFITNOENT; } diff --git a/gfs-kernel/src/gfs/bits.h
[Cluster-devel] Cluster Project branch, STABLE2, updated. cluster-2.03.02-26-gb88e25c
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=b88e25c2d3679cf06f3b9c896365b359a29bba0f The branch, STABLE2 has been updated via b88e25c2d3679cf06f3b9c896365b359a29bba0f (commit) from 07df53861cd45ac2f74fdec37a85a830280f37ab (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit b88e25c2d3679cf06f3b9c896365b359a29bba0f Author: Bob Peterson [EMAIL PROTECTED] Date: Tue May 20 09:37:53 2008 -0500 bz 446085: Back-port faster bitfit algorithm from gfs2 for better performance. --- Summary of changes: gfs-kernel/src/gfs/bits.c | 85 +++- gfs-kernel/src/gfs/bits.h |3 +- gfs-kernel/src/gfs/rgrp.c |3 +- 3 files changed, 62 insertions(+), 29 deletions(-) diff --git a/gfs-kernel/src/gfs/bits.c b/gfs-kernel/src/gfs/bits.c index da08a23..55427bb 100644 --- a/gfs-kernel/src/gfs/bits.c +++ b/gfs-kernel/src/gfs/bits.c @@ -31,6 +31,16 @@ #include gfs.h #include bits.h +#if BITS_PER_LONG == 32 +#define LBITMASK (0xUL) +#define LBITSKIP55 (0xUL) +#define LBITSKIP00 (0xUL) +#else +#define LBITMASK (0xUL) +#define LBITSKIP55 (0xUL) +#define LBITSKIP00 (0xUL) +#endif + static const char valid_change[16] = { /* current */ /* n */ 0, 1, 1, 1, @@ -115,41 +125,66 @@ gfs_testbit(struct gfs_rgrpd *rgd, */ uint32_t -gfs_bitfit(struct gfs_rgrpd *rgd, - unsigned char *buffer, unsigned int buflen, +gfs_bitfit(unsigned char *buffer, unsigned int buflen, uint32_t goal, unsigned char old_state) { - unsigned char *byte, *end, alloc; - uint32_t blk = goal; - unsigned int bit; - - byte = buffer + (goal / GFS_NBBY); - bit = (goal % GFS_NBBY) * GFS_BIT_SIZE; - end = buffer + buflen; - alloc = (old_state 1) ? 0 : 0x55; - + const u8 *byte, *start, *end; + int bit, startbit; + u32 g1, g2, misaligned; + unsigned long *plong; + unsigned long lskipval; + + lskipval = (old_state GFS_BLKST_USED) ? LBITSKIP00 : LBITSKIP55; + g1 = (goal / GFS_NBBY); + start = buffer + g1; + byte = start; +end = buffer + buflen; + g2 = ALIGN(g1, sizeof(unsigned long)); + plong = (unsigned long *)(buffer + g2); + startbit = bit = (goal % GFS_NBBY) * GFS_BIT_SIZE; + misaligned = g2 - g1; + if (!misaligned) + goto ulong_aligned; +/* parse the bitmap a byte at a time */ +misaligned: while (byte end) { - if ((*byte 0x55) == alloc) { - blk += (8 - bit) 1; - - bit = 0; - byte++; - - continue; + if (((*byte bit) GFS_BIT_MASK) == old_state) { + return goal + + (((byte - start) * GFS_NBBY) + +((bit - startbit) 1)); } - - if (((*byte bit) GFS_BIT_MASK) == old_state) - return blk; - bit += GFS_BIT_SIZE; - if (bit = 8) { + if (bit = GFS_NBBY * GFS_BIT_SIZE) { bit = 0; byte++; + misaligned--; + if (!misaligned) { + plong = (unsigned long *)byte; + goto ulong_aligned; + } } - - blk++; } + return BFITNOENT; +/* parse the bitmap a unsigned long at a time */ +ulong_aligned: + /* Stop at end - 1 or else prefetch can go past the end and segfault. + We could if it but we'd lose some of the performance gained. + This way will only slow down searching the very last 4/8 bytes + depending on architecture. I've experimented with several ways + of writing this section such as using an else before the goto + but this one seems to be the fastest. */ + while ((unsigned char *)plong end - 1) { + prefetch(plong + 1); + if (((*plong) LBITMASK) != lskipval) + break; + plong++; + } + if ((unsigned char *)plong end) { + byte = (const u8 *)plong; + misaligned += sizeof(unsigned long) - 1; + goto misaligned; + } return BFITNOENT; } diff --git a/gfs-kernel/src/gfs/bits.h
[Cluster-devel] Cluster Project branch, RHEL5, updated. cmirror_1_1_15-54-g7578e4c
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=7578e4c888fe556031fd553eb891743e29ae3cf2 The branch, RHEL5 has been updated via 7578e4c888fe556031fd553eb891743e29ae3cf2 (commit) from b0fdc2f9d6ce482ba6a7cb54cc9f17a0be1ff395 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 7578e4c888fe556031fd553eb891743e29ae3cf2 Author: Bob Peterson [EMAIL PROTECTED] Date: Fri Apr 18 14:00:21 2008 -0500 bz295301: Need man page for gfs_edit --- Summary of changes: gfs/man/Makefile |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/gfs/man/Makefile b/gfs/man/Makefile index 9a26a81..e56134c 100644 --- a/gfs/man/Makefile +++ b/gfs/man/Makefile @@ -14,6 +14,7 @@ TARGET8= \ gfs.8 \ gfs_mount.8 \ + gfs_edit.8 \ gfs_fsck.8 \ gfs_grow.8 \ gfs_jadd.8 \ hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, master, updated. gfs-kernel_0_1_22-185-g0732a36
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=0732a367878643b4dc4fc9d37d0b24dbcd623f25 The branch, master has been updated via 0732a367878643b4dc4fc9d37d0b24dbcd623f25 (commit) from f44848458ce9ec9c32d3854c575368812318da63 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 0732a367878643b4dc4fc9d37d0b24dbcd623f25 Author: Bob Peterson [EMAIL PROTECTED] Date: Fri Apr 18 14:00:21 2008 -0500 bz295301: Need man page for gfs_edit --- Summary of changes: gfs/man/Makefile |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/gfs/man/Makefile b/gfs/man/Makefile index 2308fb6..e84c8d9 100644 --- a/gfs/man/Makefile +++ b/gfs/man/Makefile @@ -13,6 +13,7 @@ TARGET= gfs.8 \ gfs_mount.8 \ + gfs_edit.8 \ gfs_fsck.8 \ gfs_grow.8 \ gfs_jadd.8 \ hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, STABLE2, updated. cluster-2.03.00-21-ge1fbc8c
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=e1fbc8c16993ba4b6957f20c21473ecddbe824e6 The branch, STABLE2 has been updated via e1fbc8c16993ba4b6957f20c21473ecddbe824e6 (commit) from 66fd7419ac6d0005c7e22c4beca887ccb143a185 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit e1fbc8c16993ba4b6957f20c21473ecddbe824e6 Author: Bob Peterson [EMAIL PROTECTED] Date: Fri Apr 18 14:00:21 2008 -0500 bz295301: Need man page for gfs_edit --- Summary of changes: gfs/man/Makefile |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/gfs/man/Makefile b/gfs/man/Makefile index 2308fb6..e84c8d9 100644 --- a/gfs/man/Makefile +++ b/gfs/man/Makefile @@ -13,6 +13,7 @@ TARGET= gfs.8 \ gfs_mount.8 \ + gfs_edit.8 \ gfs_fsck.8 \ gfs_grow.8 \ gfs_jadd.8 \ hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, RHEL5, updated. cmirror_1_1_15-46-gd48a61c
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=d48a61c7d3fac5cae7528df29614216754ad5880 The branch, RHEL5 has been updated via d48a61c7d3fac5cae7528df29614216754ad5880 (commit) from b5cc95a48417758429752998be12c059b7ac2b95 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit d48a61c7d3fac5cae7528df29614216754ad5880 Author: Bob Peterson [EMAIL PROTECTED] Date: Tue Apr 15 09:33:26 2008 -0500 bz438762: gfs_tool: Cannot allocate memory --- Summary of changes: gfs/gfs_tool/df.c |2 +- gfs/gfs_tool/tune.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gfs/gfs_tool/df.c b/gfs/gfs_tool/df.c index 8ddbd04..fcea608 100644 --- a/gfs/gfs_tool/df.c +++ b/gfs/gfs_tool/df.c @@ -30,7 +30,7 @@ #include gfs_tool.h -#define SIZE (65536) +#define SIZE (4096) /** * do_df_one - print out information about one filesystem diff --git a/gfs/gfs_tool/tune.c b/gfs/gfs_tool/tune.c index 93f35df..581c9eb 100644 --- a/gfs/gfs_tool/tune.c +++ b/gfs/gfs_tool/tune.c @@ -29,7 +29,7 @@ #include gfs_tool.h -#define SIZE (65536) +#define SIZE (4096) /** * get_tune - print out the current tuneable parameters for a filesystem hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, master, updated. gfs-kernel_0_1_22-169-gf5a705d
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=f5a705d3ed1843f403f0d03aeae447f0b6ca10a9 The branch, master has been updated via f5a705d3ed1843f403f0d03aeae447f0b6ca10a9 (commit) from 4aa023e390abb5b466ddeb0e55e2acd7b45aa6df (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit f5a705d3ed1843f403f0d03aeae447f0b6ca10a9 Author: Bob Peterson [EMAIL PROTECTED] Date: Tue Apr 15 09:33:26 2008 -0500 bz438762: gfs_tool: Cannot allocate memory --- Summary of changes: gfs/gfs_tool/df.c |2 +- gfs/gfs_tool/tune.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gfs/gfs_tool/df.c b/gfs/gfs_tool/df.c index 8ddbd04..fcea608 100644 --- a/gfs/gfs_tool/df.c +++ b/gfs/gfs_tool/df.c @@ -30,7 +30,7 @@ #include gfs_tool.h -#define SIZE (65536) +#define SIZE (4096) /** * do_df_one - print out information about one filesystem diff --git a/gfs/gfs_tool/tune.c b/gfs/gfs_tool/tune.c index 93f35df..581c9eb 100644 --- a/gfs/gfs_tool/tune.c +++ b/gfs/gfs_tool/tune.c @@ -29,7 +29,7 @@ #include gfs_tool.h -#define SIZE (65536) +#define SIZE (4096) /** * get_tune - print out the current tuneable parameters for a filesystem hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, STABLE2, updated. cluster-2.03.00-11-gc6bb755
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=c6bb7557e85b3363ff0fd10f1411373f4b747366 The branch, STABLE2 has been updated via c6bb7557e85b3363ff0fd10f1411373f4b747366 (commit) from e1718ace02bf0c3f890676b246816fc184b9d07b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit c6bb7557e85b3363ff0fd10f1411373f4b747366 Author: Bob Peterson [EMAIL PROTECTED] Date: Tue Apr 15 09:33:26 2008 -0500 bz438762: gfs_tool: Cannot allocate memory --- Summary of changes: gfs/gfs_tool/df.c |2 +- gfs/gfs_tool/tune.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gfs/gfs_tool/df.c b/gfs/gfs_tool/df.c index 8ddbd04..fcea608 100644 --- a/gfs/gfs_tool/df.c +++ b/gfs/gfs_tool/df.c @@ -30,7 +30,7 @@ #include gfs_tool.h -#define SIZE (65536) +#define SIZE (4096) /** * do_df_one - print out information about one filesystem diff --git a/gfs/gfs_tool/tune.c b/gfs/gfs_tool/tune.c index 93f35df..581c9eb 100644 --- a/gfs/gfs_tool/tune.c +++ b/gfs/gfs_tool/tune.c @@ -29,7 +29,7 @@ #include gfs_tool.h -#define SIZE (65536) +#define SIZE (4096) /** * get_tune - print out the current tuneable parameters for a filesystem hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, RHEL4, updated. gfs-kernel_2_6_9_76-31-g5f03c06
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=5f03c06d964894819c182b5112af75e5ee44a256 The branch, RHEL4 has been updated via 5f03c06d964894819c182b5112af75e5ee44a256 (commit) from 625364c99277445b97bbb3120736c358b802fb0f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 5f03c06d964894819c182b5112af75e5ee44a256 Author: Bob Peterson [EMAIL PROTECTED] Date: Sun Apr 13 11:23:49 2008 -0500 bz440896/440897 GFS: gfs_fsck should repair gfs_grow corruption (see bug #436383) --- Summary of changes: gfs/gfs_fsck/rgrp.c | 10 ++ gfs/gfs_fsck/super.c | 40 2 files changed, 50 insertions(+), 0 deletions(-) diff --git a/gfs/gfs_fsck/rgrp.c b/gfs/gfs_fsck/rgrp.c index 3948106..cf8e3ed 100644 --- a/gfs/gfs_fsck/rgrp.c +++ b/gfs/gfs_fsck/rgrp.c @@ -35,6 +35,16 @@ int fs_compute_bitstructs(struct fsck_rgrp *rgd) uint32 bytes_left, bytes; int x; + /* Max size of an rg is 2GB. A 2GB RG with (minimum) 512-byte blocks + has 4194304 blocks. We can represent 4 blocks in one bitmap byte. + Therefore, all 4194304 blocks can be represented in 1048576 bytes. + Subtract a metadata header for each 512-byte block and we get + 488 bytes of bitmap per block. Divide 1048576 by 488 and we can + be assured we should never have more than 2149 of them. */ + if (length 2149 || length == 0) { + log_err(Invalid length %u found in rindex.\n, length); + return -1; + } if(!(rgd-rd_bits = (fs_bitmap_t *)malloc(length * sizeof(fs_bitmap_t { log_err(Unable to allocate bitmap structure\n); stack; diff --git a/gfs/gfs_fsck/super.c b/gfs/gfs_fsck/super.c index 8bfb823..55ff997 100644 --- a/gfs/gfs_fsck/super.c +++ b/gfs/gfs_fsck/super.c @@ -1070,6 +1070,7 @@ int ri_update(struct fsck_sb *sdp) struct gfs_rindex buf; unsigned int rg, calc_rg_count; int error, count1 = 0, count2 = 0; + int fix_grow_problems = 0, grow_problems = 0; enum rgindex_trust_level { /* how far can we trust our RG index? */ blind_faith = 0, /* We'd like to trust the rgindex. We always used to before bz 179069. This should cover most cases. */ @@ -1170,12 +1171,41 @@ int ri_update(struct fsck_sb *sdp) osi_list_del(expected_rgd-rd_list); free(expected_rgd); } /* if we can't trust the rg index */ + else { /* blind faith -- just check for the gfs_grow problem */ + if (rgd-rd_ri.ri_data == 4294967292) { + if (!fix_grow_problems) { + log_err(A problem with the rindex file caused by gfs_grow was detected.\n); + if(query(sdp, Fix the rindex problem? (y/n))) + fix_grow_problems = 1; + } + /* Keep a counter in case we hit it more than once. */ + grow_problems++; + osi_list_del(rgd-rd_list); /* take it out of the equation */ + free(rgd); + continue; + } else if (fix_grow_problems) { + /* Once we detect the gfs_grow rindex problem, we have to */ + /* rewrite the entire rest of the rindex file, starting */ + /* with the entry AFTER the one that has the problem. */ + gfs_rindex_out(rgd-rd_ri, (char *)buf); + error = writei(sdp-riinode, (char *)buf, + (rg - grow_problems) * + sizeof(struct gfs_rindex), + sizeof(struct gfs_rindex)); + if (error != sizeof(struct gfs_rindex)) { + log_err(Unable to fix rindex entry %u.\n, + rg + 1);
[Cluster-devel] Cluster Project branch, RHEL5, updated. cmirror_1_1_15-42-ge835ef0
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=e835ef061174e2ab6ecd663145121bc454c9790c The branch, RHEL5 has been updated via e835ef061174e2ab6ecd663145121bc454c9790c (commit) from 9b83c1750434f1065c63fe547303260da15a73b2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit e835ef061174e2ab6ecd663145121bc454c9790c Author: Bob Peterson [EMAIL PROTECTED] Date: Sun Apr 13 11:23:49 2008 -0500 bz440896/440897 GFS: gfs_fsck should repair gfs_grow corruption (see bug #436383) --- Summary of changes: gfs/gfs_fsck/rgrp.c | 10 ++ gfs/gfs_fsck/super.c | 40 2 files changed, 50 insertions(+), 0 deletions(-) diff --git a/gfs/gfs_fsck/rgrp.c b/gfs/gfs_fsck/rgrp.c index 601f292..6ef6f74 100644 --- a/gfs/gfs_fsck/rgrp.c +++ b/gfs/gfs_fsck/rgrp.c @@ -35,6 +35,16 @@ int fs_compute_bitstructs(struct fsck_rgrp *rgd) uint32 bytes_left, bytes; int x; + /* Max size of an rg is 2GB. A 2GB RG with (minimum) 512-byte blocks + has 4194304 blocks. We can represent 4 blocks in one bitmap byte. + Therefore, all 4194304 blocks can be represented in 1048576 bytes. + Subtract a metadata header for each 512-byte block and we get + 488 bytes of bitmap per block. Divide 1048576 by 488 and we can + be assured we should never have more than 2149 of them. */ + if (length 2149 || length == 0) { + log_err(Invalid length %u found in rindex.\n, length); + return -1; + } if(!(rgd-rd_bits = (fs_bitmap_t *)malloc(length * sizeof(fs_bitmap_t { log_err(Unable to allocate bitmap structure\n); stack; diff --git a/gfs/gfs_fsck/super.c b/gfs/gfs_fsck/super.c index 8bfb823..55ff997 100644 --- a/gfs/gfs_fsck/super.c +++ b/gfs/gfs_fsck/super.c @@ -1070,6 +1070,7 @@ int ri_update(struct fsck_sb *sdp) struct gfs_rindex buf; unsigned int rg, calc_rg_count; int error, count1 = 0, count2 = 0; + int fix_grow_problems = 0, grow_problems = 0; enum rgindex_trust_level { /* how far can we trust our RG index? */ blind_faith = 0, /* We'd like to trust the rgindex. We always used to before bz 179069. This should cover most cases. */ @@ -1170,12 +1171,41 @@ int ri_update(struct fsck_sb *sdp) osi_list_del(expected_rgd-rd_list); free(expected_rgd); } /* if we can't trust the rg index */ + else { /* blind faith -- just check for the gfs_grow problem */ + if (rgd-rd_ri.ri_data == 4294967292) { + if (!fix_grow_problems) { + log_err(A problem with the rindex file caused by gfs_grow was detected.\n); + if(query(sdp, Fix the rindex problem? (y/n))) + fix_grow_problems = 1; + } + /* Keep a counter in case we hit it more than once. */ + grow_problems++; + osi_list_del(rgd-rd_list); /* take it out of the equation */ + free(rgd); + continue; + } else if (fix_grow_problems) { + /* Once we detect the gfs_grow rindex problem, we have to */ + /* rewrite the entire rest of the rindex file, starting */ + /* with the entry AFTER the one that has the problem. */ + gfs_rindex_out(rgd-rd_ri, (char *)buf); + error = writei(sdp-riinode, (char *)buf, + (rg - grow_problems) * + sizeof(struct gfs_rindex), + sizeof(struct gfs_rindex)); + if (error != sizeof(struct gfs_rindex)) { + log_err(Unable to fix rindex entry %u.\n, + rg + 1);
[Cluster-devel] Cluster Project branch, master, updated. gfs-kernel_0_1_22-160-g5370723
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=53707236b407fee094f1135df445670cbed15f00 The branch, master has been updated via 53707236b407fee094f1135df445670cbed15f00 (commit) from b4c3351a0850da056f879705a28aead767d78072 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 53707236b407fee094f1135df445670cbed15f00 Author: Bob Peterson [EMAIL PROTECTED] Date: Sun Apr 13 11:23:49 2008 -0500 bz440896/440897 GFS: gfs_fsck should repair gfs_grow corruption (see bug #436383) --- Summary of changes: gfs/gfs_fsck/rgrp.c | 10 ++ gfs/gfs_fsck/super.c | 40 2 files changed, 50 insertions(+), 0 deletions(-) diff --git a/gfs/gfs_fsck/rgrp.c b/gfs/gfs_fsck/rgrp.c index 601f292..6ef6f74 100644 --- a/gfs/gfs_fsck/rgrp.c +++ b/gfs/gfs_fsck/rgrp.c @@ -35,6 +35,16 @@ int fs_compute_bitstructs(struct fsck_rgrp *rgd) uint32 bytes_left, bytes; int x; + /* Max size of an rg is 2GB. A 2GB RG with (minimum) 512-byte blocks + has 4194304 blocks. We can represent 4 blocks in one bitmap byte. + Therefore, all 4194304 blocks can be represented in 1048576 bytes. + Subtract a metadata header for each 512-byte block and we get + 488 bytes of bitmap per block. Divide 1048576 by 488 and we can + be assured we should never have more than 2149 of them. */ + if (length 2149 || length == 0) { + log_err(Invalid length %u found in rindex.\n, length); + return -1; + } if(!(rgd-rd_bits = (fs_bitmap_t *)malloc(length * sizeof(fs_bitmap_t { log_err(Unable to allocate bitmap structure\n); stack; diff --git a/gfs/gfs_fsck/super.c b/gfs/gfs_fsck/super.c index 8bfb823..55ff997 100644 --- a/gfs/gfs_fsck/super.c +++ b/gfs/gfs_fsck/super.c @@ -1070,6 +1070,7 @@ int ri_update(struct fsck_sb *sdp) struct gfs_rindex buf; unsigned int rg, calc_rg_count; int error, count1 = 0, count2 = 0; + int fix_grow_problems = 0, grow_problems = 0; enum rgindex_trust_level { /* how far can we trust our RG index? */ blind_faith = 0, /* We'd like to trust the rgindex. We always used to before bz 179069. This should cover most cases. */ @@ -1170,12 +1171,41 @@ int ri_update(struct fsck_sb *sdp) osi_list_del(expected_rgd-rd_list); free(expected_rgd); } /* if we can't trust the rg index */ + else { /* blind faith -- just check for the gfs_grow problem */ + if (rgd-rd_ri.ri_data == 4294967292) { + if (!fix_grow_problems) { + log_err(A problem with the rindex file caused by gfs_grow was detected.\n); + if(query(sdp, Fix the rindex problem? (y/n))) + fix_grow_problems = 1; + } + /* Keep a counter in case we hit it more than once. */ + grow_problems++; + osi_list_del(rgd-rd_list); /* take it out of the equation */ + free(rgd); + continue; + } else if (fix_grow_problems) { + /* Once we detect the gfs_grow rindex problem, we have to */ + /* rewrite the entire rest of the rindex file, starting */ + /* with the entry AFTER the one that has the problem. */ + gfs_rindex_out(rgd-rd_ri, (char *)buf); + error = writei(sdp-riinode, (char *)buf, + (rg - grow_problems) * + sizeof(struct gfs_rindex), + sizeof(struct gfs_rindex)); + if (error != sizeof(struct gfs_rindex)) { + log_err(Unable to fix rindex entry %u.\n, + rg + 1);
[Cluster-devel] Cluster Project branch, STABLE2, updated. cluster-2.03.00-3-gb8a071f
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=b8a071f51986e3a3e9fa670259dd012ec0a23141 The branch, STABLE2 has been updated via b8a071f51986e3a3e9fa670259dd012ec0a23141 (commit) from 22663a865681ebcc2f3c921a3ef3967d66d5663f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit b8a071f51986e3a3e9fa670259dd012ec0a23141 Author: Bob Peterson [EMAIL PROTECTED] Date: Sun Apr 13 11:23:49 2008 -0500 bz440896/440897 GFS: gfs_fsck should repair gfs_grow corruption (see bug #436383) --- Summary of changes: gfs/gfs_fsck/rgrp.c | 10 ++ gfs/gfs_fsck/super.c | 40 2 files changed, 50 insertions(+), 0 deletions(-) diff --git a/gfs/gfs_fsck/rgrp.c b/gfs/gfs_fsck/rgrp.c index 601f292..6ef6f74 100644 --- a/gfs/gfs_fsck/rgrp.c +++ b/gfs/gfs_fsck/rgrp.c @@ -35,6 +35,16 @@ int fs_compute_bitstructs(struct fsck_rgrp *rgd) uint32 bytes_left, bytes; int x; + /* Max size of an rg is 2GB. A 2GB RG with (minimum) 512-byte blocks + has 4194304 blocks. We can represent 4 blocks in one bitmap byte. + Therefore, all 4194304 blocks can be represented in 1048576 bytes. + Subtract a metadata header for each 512-byte block and we get + 488 bytes of bitmap per block. Divide 1048576 by 488 and we can + be assured we should never have more than 2149 of them. */ + if (length 2149 || length == 0) { + log_err(Invalid length %u found in rindex.\n, length); + return -1; + } if(!(rgd-rd_bits = (fs_bitmap_t *)malloc(length * sizeof(fs_bitmap_t { log_err(Unable to allocate bitmap structure\n); stack; diff --git a/gfs/gfs_fsck/super.c b/gfs/gfs_fsck/super.c index 8bfb823..55ff997 100644 --- a/gfs/gfs_fsck/super.c +++ b/gfs/gfs_fsck/super.c @@ -1070,6 +1070,7 @@ int ri_update(struct fsck_sb *sdp) struct gfs_rindex buf; unsigned int rg, calc_rg_count; int error, count1 = 0, count2 = 0; + int fix_grow_problems = 0, grow_problems = 0; enum rgindex_trust_level { /* how far can we trust our RG index? */ blind_faith = 0, /* We'd like to trust the rgindex. We always used to before bz 179069. This should cover most cases. */ @@ -1170,12 +1171,41 @@ int ri_update(struct fsck_sb *sdp) osi_list_del(expected_rgd-rd_list); free(expected_rgd); } /* if we can't trust the rg index */ + else { /* blind faith -- just check for the gfs_grow problem */ + if (rgd-rd_ri.ri_data == 4294967292) { + if (!fix_grow_problems) { + log_err(A problem with the rindex file caused by gfs_grow was detected.\n); + if(query(sdp, Fix the rindex problem? (y/n))) + fix_grow_problems = 1; + } + /* Keep a counter in case we hit it more than once. */ + grow_problems++; + osi_list_del(rgd-rd_list); /* take it out of the equation */ + free(rgd); + continue; + } else if (fix_grow_problems) { + /* Once we detect the gfs_grow rindex problem, we have to */ + /* rewrite the entire rest of the rindex file, starting */ + /* with the entry AFTER the one that has the problem. */ + gfs_rindex_out(rgd-rd_ri, (char *)buf); + error = writei(sdp-riinode, (char *)buf, + (rg - grow_problems) * + sizeof(struct gfs_rindex), + sizeof(struct gfs_rindex)); + if (error != sizeof(struct gfs_rindex)) { + log_err(Unable to fix rindex entry %u.\n, + rg +
[Cluster-devel] Cluster Project branch, master, updated. gfs-kernel_0_1_22-155-g56e13f4
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=56e13f474bc8abf02324e294462527755f8752f4 The branch, master has been updated via 56e13f474bc8abf02324e294462527755f8752f4 (commit) via f0454169acbc4190d2c902a1b25cab35282351d5 (commit) via 19e98c46738e96f8aa2c4c1719075d8a4d369518 (commit) via 0e66ec5001902c704aadc0f6224ce3391ed643c6 (commit) from 9fecacd358dba0a191f29e7932281fc862a6ec33 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 56e13f474bc8abf02324e294462527755f8752f4 Author: Bob Peterson [EMAIL PROTECTED] Date: Thu Apr 10 10:45:47 2008 -0500 Fix some compiler warnings in gfs2_edit commit f0454169acbc4190d2c902a1b25cab35282351d5 Author: Bob Peterson [EMAIL PROTECTED] Date: Thu Apr 10 10:45:47 2008 -0500 gfs2_edit was not recalculating the max block size after it figured that out. commit 19e98c46738e96f8aa2c4c1719075d8a4d369518 Author: Bob Peterson [EMAIL PROTECTED] Date: Tue Mar 18 15:44:24 2008 -0500 Fix gfs2_edit print options (-p) to work properly for gfs-1 rgs and rindex. Also fixed rgflags option for gfs1. commit 0e66ec5001902c704aadc0f6224ce3391ed643c6 Author: Bob Peterson [EMAIL PROTECTED] Date: Tue Mar 11 18:18:43 2008 -0500 Fix savemeta so it saves gfs-1 rg information properly Also add savergs option to facilitate rg-only repairs. --- Summary of changes: gfs2/edit/gfs2hex.c | 12 ++-- gfs2/edit/hexedit.c | 178 +- gfs2/edit/hexedit.h | 32 + gfs2/edit/savemeta.c | 38 +++ 4 files changed, 210 insertions(+), 50 deletions(-) diff --git a/gfs2/edit/gfs2hex.c b/gfs2/edit/gfs2hex.c index dfd6c03..7262d78 100644 --- a/gfs2/edit/gfs2hex.c +++ b/gfs2/edit/gfs2hex.c @@ -70,9 +70,9 @@ void print_gfs2(const char *fmt, ...) va_start(args, fmt); vsprintf(string, fmt, args); if (termlines) - printw(string); + printw(%s, string); else - printf(string); + printf(%s, string); va_end(args); } @@ -127,9 +127,9 @@ void print_it(const char *label, const char *fmt, const char *fmt2, ...) vsprintf(tmp_string, fmt, args); if (termlines) - printw(tmp_string); + printw(%s, tmp_string); else - printf(tmp_string); + printf(%s, tmp_string); check_highlight(FALSE); if (fmt2) { @@ -159,10 +159,10 @@ void print_it(const char *label, const char *fmt, const char *fmt2, ...) fmtstring=(decimal); if (termlines) { move(line, 50); - printw(fmtstring); + printw(%s, fmtstring); } else - printf(fmtstring); + printf(%s, fmtstring); } if (termlines) { refresh(); diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c index bd4f917..07edf81 100644 --- a/gfs2/edit/hexedit.c +++ b/gfs2/edit/hexedit.c @@ -387,7 +387,7 @@ int display_block_type(const char *lpBuffer, int from_restore) } if (block == RGLIST_DUMMY_BLOCK) { ret_type = GFS2_METATYPE_RG; - struct_len = sizeof(struct gfs2_rgrp); + struct_len = gfs1 ? sizeof(struct gfs_rgrp) : sizeof(struct gfs2_rgrp); } else if ((ret_type = get_block_type(lpBuffer))) { switch (*(lpBuffer+7)) { @@ -618,6 +618,17 @@ uint64_t masterblock(const char *fn) } /* */ +/* risize - size of one rindex entry, whether gfs1 or gfs2 */ +/* */ +static int risize(void) +{ + if (gfs1) + return sizeof(struct gfs_rindex); + else + return sizeof(struct gfs2_rindex); +} + +/* */ /* rgcount - return how many rgrps there are. */ /* */ void rgcount(void) @@ -633,7 +644,7 @@ void rgcount(void) ribh = bread(sbd, block); riinode = inode_get(sbd, ribh);
[Cluster-devel] Cluster Project branch, STABLE2, updated. cluster-2.02.00-62-g819fddb
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=819fddbffaf73550a046f79e78d5147f0e8b9030 The branch, STABLE2 has been updated via 819fddbffaf73550a046f79e78d5147f0e8b9030 (commit) via acf6100f3e0f2eefe73019d5a1b2d18cd59ea093 (commit) via 755a9a68e99b29856aef856df8ab5a1af46b65ed (commit) via 40cd555c21891563f67411175854a00fbb704b25 (commit) from a3ff336f79cabcb020c750cb569de0872bf3e05d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 819fddbffaf73550a046f79e78d5147f0e8b9030 Author: Bob Peterson [EMAIL PROTECTED] Date: Thu Apr 10 10:45:47 2008 -0500 Fix some compiler warnings in gfs2_edit commit acf6100f3e0f2eefe73019d5a1b2d18cd59ea093 Author: Bob Peterson [EMAIL PROTECTED] Date: Thu Apr 10 10:45:47 2008 -0500 gfs2_edit was not recalculating the max block size after it figured that out. commit 755a9a68e99b29856aef856df8ab5a1af46b65ed Author: Bob Peterson [EMAIL PROTECTED] Date: Tue Mar 18 15:44:24 2008 -0500 Fix gfs2_edit print options (-p) to work properly for gfs-1 rgs and rindex. Also fixed rgflags option for gfs1. commit 40cd555c21891563f67411175854a00fbb704b25 Author: Bob Peterson [EMAIL PROTECTED] Date: Tue Mar 11 18:18:43 2008 -0500 Fix savemeta so it saves gfs-1 rg information properly Also add savergs option to facilitate rg-only repairs. --- Summary of changes: gfs2/edit/gfs2hex.c | 12 ++-- gfs2/edit/hexedit.c | 178 +- gfs2/edit/hexedit.h | 32 + gfs2/edit/savemeta.c | 38 +++ 4 files changed, 210 insertions(+), 50 deletions(-) diff --git a/gfs2/edit/gfs2hex.c b/gfs2/edit/gfs2hex.c index dfd6c03..7262d78 100644 --- a/gfs2/edit/gfs2hex.c +++ b/gfs2/edit/gfs2hex.c @@ -70,9 +70,9 @@ void print_gfs2(const char *fmt, ...) va_start(args, fmt); vsprintf(string, fmt, args); if (termlines) - printw(string); + printw(%s, string); else - printf(string); + printf(%s, string); va_end(args); } @@ -127,9 +127,9 @@ void print_it(const char *label, const char *fmt, const char *fmt2, ...) vsprintf(tmp_string, fmt, args); if (termlines) - printw(tmp_string); + printw(%s, tmp_string); else - printf(tmp_string); + printf(%s, tmp_string); check_highlight(FALSE); if (fmt2) { @@ -159,10 +159,10 @@ void print_it(const char *label, const char *fmt, const char *fmt2, ...) fmtstring=(decimal); if (termlines) { move(line, 50); - printw(fmtstring); + printw(%s, fmtstring); } else - printf(fmtstring); + printf(%s, fmtstring); } if (termlines) { refresh(); diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c index bd4f917..07edf81 100644 --- a/gfs2/edit/hexedit.c +++ b/gfs2/edit/hexedit.c @@ -387,7 +387,7 @@ int display_block_type(const char *lpBuffer, int from_restore) } if (block == RGLIST_DUMMY_BLOCK) { ret_type = GFS2_METATYPE_RG; - struct_len = sizeof(struct gfs2_rgrp); + struct_len = gfs1 ? sizeof(struct gfs_rgrp) : sizeof(struct gfs2_rgrp); } else if ((ret_type = get_block_type(lpBuffer))) { switch (*(lpBuffer+7)) { @@ -618,6 +618,17 @@ uint64_t masterblock(const char *fn) } /* */ +/* risize - size of one rindex entry, whether gfs1 or gfs2 */ +/* */ +static int risize(void) +{ + if (gfs1) + return sizeof(struct gfs_rindex); + else + return sizeof(struct gfs2_rindex); +} + +/* */ /* rgcount - return how many rgrps there are. */ /* */ void rgcount(void) @@ -633,7 +644,7 @@ void rgcount(void) ribh = bread(sbd, block); riinode = inode_get(sbd, ribh);
[Cluster-devel] Cluster Project branch, RHEL5, updated. cmirror_1_1_15-39-g73916dd
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=73916dd1f4ce1fa237a8e01e682e6380132edeeb The branch, RHEL5 has been updated via 73916dd1f4ce1fa237a8e01e682e6380132edeeb (commit) via 3c709adffbfcaf7abd60792985631e4c677575cc (commit) from 76161dd2dc6dc3030eac72342fe701519e8e53f2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 73916dd1f4ce1fa237a8e01e682e6380132edeeb Author: Bob Peterson [EMAIL PROTECTED] Date: Wed Apr 9 17:03:46 2008 -0500 Resolves: bz 431952: GFS: gfs-kernel should use device major:minor commit 3c709adffbfcaf7abd60792985631e4c677575cc Author: Bob Peterson [EMAIL PROTECTED] Date: Fri Mar 14 11:17:46 2008 -0500 Resolves: bz 421761: 'gfs_tool lockdump' wrongly says 'unknown mountpoint' re HP cciss RAID array --- Summary of changes: gfs-kernel/src/gfs/proc.c |9 +- gfs/gfs_tool/util.c | 64 +++-- 2 files changed, 17 insertions(+), 56 deletions(-) diff --git a/gfs-kernel/src/gfs/proc.c b/gfs-kernel/src/gfs/proc.c index c86b4e6..1c38b0d 100644 --- a/gfs-kernel/src/gfs/proc.c +++ b/gfs-kernel/src/gfs/proc.c @@ -77,6 +77,7 @@ do_list(char *user_buf, size_t size) struct gfs_sbd *sdp = NULL; unsigned int x; char num[21]; + char device_id[32]; char *buf; int error = 0; @@ -85,8 +86,10 @@ do_list(char *user_buf, size_t size) x = 0; for (tmp = gfs_fs_list.next; tmp != gfs_fs_list; tmp = tmp-next) { sdp = list_entry(tmp, struct gfs_sbd, sd_list); + sprintf(device_id, %u:%u, MAJOR(sdp-sd_vfs-s_dev), + MINOR(sdp-sd_vfs-s_dev)); x += sprintf(num, %lu, (unsigned long)sdp) + - strlen(sdp-sd_vfs-s_id) + + strlen(device_id) + strlen(sdp-sd_fsname) + 3; } @@ -105,8 +108,10 @@ do_list(char *user_buf, size_t size) x = 0; for (tmp = gfs_fs_list.next; tmp != gfs_fs_list; tmp = tmp-next) { sdp = list_entry(tmp, struct gfs_sbd, sd_list); + sprintf(device_id, %u:%u, MAJOR(sdp-sd_vfs-s_dev), + MINOR(sdp-sd_vfs-s_dev)); x += sprintf(buf + x, %lu %s %s\n, -(unsigned long)sdp, sdp-sd_vfs-s_id, sdp-sd_fsname); +(unsigned long)sdp, device_id, sdp-sd_fsname); } if (copy_to_user(user_buf, buf, x)) diff --git a/gfs/gfs_tool/util.c b/gfs/gfs_tool/util.c index b9a4703..a4c1ab4 100644 --- a/gfs/gfs_tool/util.c +++ b/gfs/gfs_tool/util.c @@ -122,52 +122,6 @@ str2lines(char *str) } /** - * do_basename - Create dm-N style name for the device - * @device: - * - * Returns: Pointer to dm name or basename - */ - -static char * -do_basename(char *device) -{ - FILE *file; - int found = FALSE; - char line[256], major_name[256]; - unsigned int major_number; - struct stat st; - - file = fopen(/proc/devices, r); - if (!file) - goto punt; - - while (fgets(line, 256, file)) { - if (sscanf(line, %u %s, major_number, major_name) != 2) - continue; - if (strcmp(major_name, device-mapper) != 0) - continue; - found = TRUE; - break; - } - - fclose(file); - - if (!found) - goto punt; - - if (stat(device, st)) - goto punt; - if (major(st.st_rdev) == major_number) { - static char realname[16]; - snprintf(realname, 16, dm-%u, minor(st.st_rdev)); - return realname; - } - - punt: - return basename(device); -} - -/** * mp2cookie - Find the cookie for a filesystem given its mountpoint * @mp: * @ioctl_ok: If this is FALSE, it's not acceptable to open() the mountpoint @@ -181,9 +135,9 @@ mp2cookie(char *mp, int ioctl_ok) char *cookie; char *list, **lines; FILE *file; - char line[256], device[256]; - char *dev = NULL; + char line[256], device[256], dev_id[256]; unsigned int x; + struct stat st; cookie = malloc(256); if (!cookie) @@ -196,6 +150,7 @@ mp2cookie(char *mp, int ioctl_ok) die(can't open /proc/mounts: %s\n, strerror(errno)); + memset(dev_id, 0, sizeof(dev_id)); while (fgets(line, 256, file)) { char path[256], type[256];
[Cluster-devel] Cluster Project branch, RHEL51, updated. cman_2_0_74-12-g8f28897
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=8f28897241537e5bac05f6a732216484c0e433bf The branch, RHEL51 has been updated via 8f28897241537e5bac05f6a732216484c0e433bf (commit) from 24fabdf057dcc2ec114f34e7b94b320c32f6d226 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 8f28897241537e5bac05f6a732216484c0e433bf Author: Bob Peterson [EMAIL PROTECTED] Date: Wed Apr 2 16:07:53 2008 -0500 Resolves: bz 436383: GFS filesystem size inconsistent --- Summary of changes: gfs/gfs_grow/main.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/gfs/gfs_grow/main.c b/gfs/gfs_grow/main.c index 3bd7ff6..5a92059 100644 --- a/gfs/gfs_grow/main.c +++ b/gfs/gfs_grow/main.c @@ -683,11 +683,13 @@ create_rgrps(void) uint64_t space = devsize - fssize; uint64_t optimal_rgrp_size = RGRP_STUFFED_BLKS(fs_sb) + 14 * RGRP_BITMAP_BLKS(fs_sb) + 15; - uint64_t rgrps = 1 + space / optimal_rgrp_size; + uint64_t rgrps = space / optimal_rgrp_size; uint64_t offset = fssize; uint64_t rgsize; uint64_t n; + if (space % optimal_rgrp_size) + rgrps++; rgsize = optimal_rgrp_size; for (n = 0; n rgrps; n++) hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, RHEL4, updated. gfs-kernel_2_6_9_76-24-g0536f85
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=0536f85e62db2ac86b0f47c6e6089090261eceae The branch, RHEL4 has been updated via 0536f85e62db2ac86b0f47c6e6089090261eceae (commit) from 36e10fa435afc59e5a0e658c1b9b7ee2c34f184a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 0536f85e62db2ac86b0f47c6e6089090261eceae Author: Bob Peterson [EMAIL PROTECTED] Date: Wed Apr 2 16:07:53 2008 -0500 Resolves: bz 436383: GFS filesystem size inconsistent --- Summary of changes: gfs/gfs_grow/main.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/gfs/gfs_grow/main.c b/gfs/gfs_grow/main.c index e43fa20..4a2494a 100644 --- a/gfs/gfs_grow/main.c +++ b/gfs/gfs_grow/main.c @@ -684,11 +684,13 @@ create_rgrps(void) uint64_t space = devsize - fssize; uint64_t optimal_rgrp_size = RGRP_STUFFED_BLKS(fs_sb) + 14 * RGRP_BITMAP_BLKS(fs_sb) + 15; - uint64_t rgrps = 1 + space / optimal_rgrp_size; + uint64_t rgrps = space / optimal_rgrp_size; uint64_t offset = fssize; uint64_t rgsize; uint64_t n; + if (space % optimal_rgrp_size) + rgrps++; rgsize = optimal_rgrp_size; for (n = 0; n rgrps; n++) hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, RHEL5, updated. cmirror_1_1_15-30-g82d50be
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=82d50be085f83d31486796a3a7bac162a98e6024 The branch, RHEL5 has been updated via 82d50be085f83d31486796a3a7bac162a98e6024 (commit) from fb8ff413588b1404d99b78adf30987beaea9db32 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 82d50be085f83d31486796a3a7bac162a98e6024 Author: Bob Peterson [EMAIL PROTECTED] Date: Wed Apr 2 16:07:53 2008 -0500 Resolves: bz 436383: GFS filesystem size inconsistent --- Summary of changes: gfs/gfs_grow/main.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/gfs/gfs_grow/main.c b/gfs/gfs_grow/main.c index 28be42a..fa560fc 100644 --- a/gfs/gfs_grow/main.c +++ b/gfs/gfs_grow/main.c @@ -683,11 +683,13 @@ create_rgrps(void) uint64_t space = devsize - fssize; uint64_t optimal_rgrp_size = RGRP_STUFFED_BLKS(fs_sb) + 14 * RGRP_BITMAP_BLKS(fs_sb) + 15; - uint64_t rgrps = 1 + space / optimal_rgrp_size; + uint64_t rgrps = space / optimal_rgrp_size; uint64_t offset = fssize; uint64_t rgsize; uint64_t n; + if (space % optimal_rgrp_size) + rgrps++; rgsize = optimal_rgrp_size; for (n = 0; n rgrps; n++) hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, RHEL52, updated. cmirror_1_1_15-19-gc53ff8e
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=c53ff8ef75c67fb53955905db96c9f96c28da7bf The branch, RHEL52 has been updated via c53ff8ef75c67fb53955905db96c9f96c28da7bf (commit) from 0bb606fa87d35682d520ef93e837b0c746fb1cdf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit c53ff8ef75c67fb53955905db96c9f96c28da7bf Author: Bob Peterson [EMAIL PROTECTED] Date: Wed Apr 2 16:07:53 2008 -0500 Resolves: bz 436383: GFS filesystem size inconsistent --- Summary of changes: gfs/gfs_grow/main.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/gfs/gfs_grow/main.c b/gfs/gfs_grow/main.c index 28be42a..fa560fc 100644 --- a/gfs/gfs_grow/main.c +++ b/gfs/gfs_grow/main.c @@ -683,11 +683,13 @@ create_rgrps(void) uint64_t space = devsize - fssize; uint64_t optimal_rgrp_size = RGRP_STUFFED_BLKS(fs_sb) + 14 * RGRP_BITMAP_BLKS(fs_sb) + 15; - uint64_t rgrps = 1 + space / optimal_rgrp_size; + uint64_t rgrps = space / optimal_rgrp_size; uint64_t offset = fssize; uint64_t rgsize; uint64_t n; + if (space % optimal_rgrp_size) + rgrps++; rgsize = optimal_rgrp_size; for (n = 0; n rgrps; n++) hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, master, updated. gfs-kernel_0_1_22-124-ga740fce
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=a740fce541402c9efa42e12eef8f632920c53cb7 The branch, master has been updated via a740fce541402c9efa42e12eef8f632920c53cb7 (commit) from 4081566d3829750925f474d0698d30aa5ac6c598 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit a740fce541402c9efa42e12eef8f632920c53cb7 Author: Bob Peterson [EMAIL PROTECTED] Date: Wed Apr 2 16:07:53 2008 -0500 Resolves: bz 436383: GFS filesystem size inconsistent --- Summary of changes: gfs/gfs_grow/main.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/gfs/gfs_grow/main.c b/gfs/gfs_grow/main.c index 8d28a4c..3d6da84 100644 --- a/gfs/gfs_grow/main.c +++ b/gfs/gfs_grow/main.c @@ -683,11 +683,13 @@ create_rgrps(void) uint64_t space = devsize - fssize; uint64_t optimal_rgrp_size = RGRP_STUFFED_BLKS(fs_sb) + 14 * RGRP_BITMAP_BLKS(fs_sb) + 15; - uint64_t rgrps = 1 + space / optimal_rgrp_size; + uint64_t rgrps = space / optimal_rgrp_size; uint64_t offset = fssize; uint64_t rgsize; uint64_t n; + if (space % optimal_rgrp_size) + rgrps++; rgsize = optimal_rgrp_size; for (n = 0; n rgrps; n++) hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, RHEL4, updated. gfs-kernel_2_6_9_76-19-g22b442e
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=22b442ed10069372d306e7f0fd162cf5387c5211 The branch, RHEL4 has been updated via 22b442ed10069372d306e7f0fd162cf5387c5211 (commit) from 9d2d37ee3db933f01c8e5021d6d6a5897d5fe017 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 22b442ed10069372d306e7f0fd162cf5387c5211 Author: Bob Peterson [EMAIL PROTECTED] Date: Tue Mar 25 13:33:48 2008 -0500 Resolves: bz 435469: gfs_tool: Cannot allocate memory --- Summary of changes: gfs/gfs_tool/df.c |2 +- gfs/gfs_tool/tune.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gfs/gfs_tool/df.c b/gfs/gfs_tool/df.c index f385ea7..2d1030c 100644 --- a/gfs/gfs_tool/df.c +++ b/gfs/gfs_tool/df.c @@ -33,7 +33,7 @@ struct file_lock { int x; }; #include gfs_tool.h -#define SIZE (65536) +#define SIZE (4096) /** * do_df_one - print out information about one filesystem diff --git a/gfs/gfs_tool/tune.c b/gfs/gfs_tool/tune.c index 8b152cb..1e8bc1a 100644 --- a/gfs/gfs_tool/tune.c +++ b/gfs/gfs_tool/tune.c @@ -29,7 +29,7 @@ #include gfs_tool.h -#define SIZE (65536) +#define SIZE (4096) /** * get_tune - print out the current tuneable parameters for a filesystem hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, STABLE2, updated. cluster-2.02.00-27-g8f3ec43
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=8f3ec431efff4ce45f8765075e7c65f53d208905 The branch, STABLE2 has been updated via 8f3ec431efff4ce45f8765075e7c65f53d208905 (commit) from b2be4d60359ff6fc01a2ccf9a98850063b8e1da3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 8f3ec431efff4ce45f8765075e7c65f53d208905 Author: Bob Peterson [EMAIL PROTECTED] Date: Mon Mar 24 09:51:36 2008 -0500 Update to prior commit for bz431945: I forgot that STABLE2 does not have a diaper device. --- Summary of changes: gfs-kernel/src/gfs/proc.c | 12 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/gfs-kernel/src/gfs/proc.c b/gfs-kernel/src/gfs/proc.c index b58181c..1c38b0d 100644 --- a/gfs-kernel/src/gfs/proc.c +++ b/gfs-kernel/src/gfs/proc.c @@ -27,7 +27,6 @@ #include lm.h #include proc.h #include super.h -#include diaper.h struct list_head gfs_fs_list; struct semaphore gfs_fs_lock; @@ -81,16 +80,14 @@ do_list(char *user_buf, size_t size) char device_id[32]; char *buf; int error = 0; - struct block_device *bdevice; down(gfs_fs_lock); x = 0; for (tmp = gfs_fs_list.next; tmp != gfs_fs_list; tmp = tmp-next) { sdp = list_entry(tmp, struct gfs_sbd, sd_list); - bdevice = gfs_diaper_2real(sdp-sd_vfs-s_bdev); - sprintf(device_id, %u:%u, MAJOR(bdevice-bd_dev), - MINOR(bdevice-bd_dev)); + sprintf(device_id, %u:%u, MAJOR(sdp-sd_vfs-s_dev), + MINOR(sdp-sd_vfs-s_dev)); x += sprintf(num, %lu, (unsigned long)sdp) + strlen(device_id) + strlen(sdp-sd_fsname) + 3; @@ -111,9 +108,8 @@ do_list(char *user_buf, size_t size) x = 0; for (tmp = gfs_fs_list.next; tmp != gfs_fs_list; tmp = tmp-next) { sdp = list_entry(tmp, struct gfs_sbd, sd_list); - bdevice = gfs_diaper_2real(sdp-sd_vfs-s_bdev); - sprintf(device_id, %u:%u, MAJOR(bdevice-bd_dev), - MINOR(bdevice-bd_dev)); + sprintf(device_id, %u:%u, MAJOR(sdp-sd_vfs-s_dev), + MINOR(sdp-sd_vfs-s_dev)); x += sprintf(buf + x, %lu %s %s\n, (unsigned long)sdp, device_id, sdp-sd_fsname); } hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, master, updated. gfs-kernel_0_1_22-82-gca0ff53
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=ca0ff53f1889723bcea026e734a53574a9cbae6e The branch, master has been updated via ca0ff53f1889723bcea026e734a53574a9cbae6e (commit) via ddf06f1c8d723090aad82f4b742b388b99fc6615 (commit) via cee0863aa683dd7982f5396d5cc50752ca65b10e (commit) from 256cd80bd60d1194bc5148fb7bd656a0fd8a5a27 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit ca0ff53f1889723bcea026e734a53574a9cbae6e Merge: ddf06f1c8d723090aad82f4b742b388b99fc6615 256cd80bd60d1194bc5148fb7bd656a0fd8a5a27 Author: Bob Peterson [EMAIL PROTECTED] Date: Wed Mar 19 09:02:13 2008 -0500 Merge branch 'master' of ssh://sources.redhat.com/git/cluster into master.bz431945 commit ddf06f1c8d723090aad82f4b742b388b99fc6615 Author: Bob Peterson [EMAIL PROTECTED] Date: Fri Mar 14 11:09:09 2008 -0500 Resolves: bz 431945: GFS: gfs-kernel should use device major:minor commit cee0863aa683dd7982f5396d5cc50752ca65b10e Author: Bob Peterson [EMAIL PROTECTED] Date: Fri Mar 14 11:17:46 2008 -0500 Resolves: bz 421761: 'gfs_tool lockdump' wrongly says 'unknown mountpoint' re HP cciss RAID array --- Summary of changes: gfs-kernel/src/gfs/proc.c | 13 +++- gfs/gfs_tool/util.c | 64 +++-- 2 files changed, 21 insertions(+), 56 deletions(-) diff --git a/gfs-kernel/src/gfs/proc.c b/gfs-kernel/src/gfs/proc.c index c86b4e6..b58181c 100644 --- a/gfs-kernel/src/gfs/proc.c +++ b/gfs-kernel/src/gfs/proc.c @@ -27,6 +27,7 @@ #include lm.h #include proc.h #include super.h +#include diaper.h struct list_head gfs_fs_list; struct semaphore gfs_fs_lock; @@ -77,16 +78,21 @@ do_list(char *user_buf, size_t size) struct gfs_sbd *sdp = NULL; unsigned int x; char num[21]; + char device_id[32]; char *buf; int error = 0; + struct block_device *bdevice; down(gfs_fs_lock); x = 0; for (tmp = gfs_fs_list.next; tmp != gfs_fs_list; tmp = tmp-next) { sdp = list_entry(tmp, struct gfs_sbd, sd_list); + bdevice = gfs_diaper_2real(sdp-sd_vfs-s_bdev); + sprintf(device_id, %u:%u, MAJOR(bdevice-bd_dev), + MINOR(bdevice-bd_dev)); x += sprintf(num, %lu, (unsigned long)sdp) + - strlen(sdp-sd_vfs-s_id) + + strlen(device_id) + strlen(sdp-sd_fsname) + 3; } @@ -105,8 +111,11 @@ do_list(char *user_buf, size_t size) x = 0; for (tmp = gfs_fs_list.next; tmp != gfs_fs_list; tmp = tmp-next) { sdp = list_entry(tmp, struct gfs_sbd, sd_list); + bdevice = gfs_diaper_2real(sdp-sd_vfs-s_bdev); + sprintf(device_id, %u:%u, MAJOR(bdevice-bd_dev), + MINOR(bdevice-bd_dev)); x += sprintf(buf + x, %lu %s %s\n, -(unsigned long)sdp, sdp-sd_vfs-s_id, sdp-sd_fsname); +(unsigned long)sdp, device_id, sdp-sd_fsname); } if (copy_to_user(user_buf, buf, x)) diff --git a/gfs/gfs_tool/util.c b/gfs/gfs_tool/util.c index b9a4703..a4c1ab4 100644 --- a/gfs/gfs_tool/util.c +++ b/gfs/gfs_tool/util.c @@ -122,52 +122,6 @@ str2lines(char *str) } /** - * do_basename - Create dm-N style name for the device - * @device: - * - * Returns: Pointer to dm name or basename - */ - -static char * -do_basename(char *device) -{ - FILE *file; - int found = FALSE; - char line[256], major_name[256]; - unsigned int major_number; - struct stat st; - - file = fopen(/proc/devices, r); - if (!file) - goto punt; - - while (fgets(line, 256, file)) { - if (sscanf(line, %u %s, major_number, major_name) != 2) - continue; - if (strcmp(major_name, device-mapper) != 0) - continue; - found = TRUE; - break; - } - - fclose(file); - - if (!found) - goto punt; - - if (stat(device, st)) - goto punt; - if (major(st.st_rdev) == major_number) { - static char realname[16]; - snprintf(realname, 16, dm-%u, minor(st.st_rdev)); - return realname; - } - - punt: - return basename(device); -} - -/** * mp2cookie - Find the cookie for a filesystem given its mountpoint * @mp: * @ioctl_ok: If this is FALSE,
[Cluster-devel] Cluster Project branch, RHEL5, updated. cmirror_1_1_15-8-g14e7029
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=14e702986f37607300cafdf68886daf15c10be38 The branch, RHEL5 has been updated via 14e702986f37607300cafdf68886daf15c10be38 (commit) from b70ad6fe5a5795a699ad208ab009a4c952e9078f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 14e702986f37607300cafdf68886daf15c10be38 Author: Bob Peterson [EMAIL PROTECTED] Date: Wed Mar 12 10:36:23 2008 -0500 Resolves: bz 435917: GFS2: mkfs.gfs2 default lock protocol differs from man page --- Summary of changes: gfs2/man/mkfs.gfs2.8 |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gfs2/man/mkfs.gfs2.8 b/gfs2/man/mkfs.gfs2.8 index c68ff8d..b411467 100644 --- a/gfs2/man/mkfs.gfs2.8 +++ b/gfs2/man/mkfs.gfs2.8 @@ -48,10 +48,10 @@ the filesystem. .TP \fB-p\fP \fILockProtoName\fR LockProtoName is the name of the locking protocol to use. Acceptable -locking protocols are \fIlock_dlm\fR or if you are using GFS2 -as a local filesystem (\fB1 node only\fP), you can specify the +locking protocols are \fIlock_dlm\fR (for shared storage) or if you are +using GFS2 as a local filesystem (\fB1 node only\fP), you can specify the \fIlock_nolock\fR protocol. If this option is not specified, -\fIlock_nolock\fR protocol will be assumed. +\fIlock_dlm\fR protocol will be assumed. .TP \fB-q\fP Be quiet. Don't print anything. hooks/post-receive -- Cluster Project
[Cluster-devel] Cluster Project branch, RHEL4, updated. gfs-kernel_2_6_9_76-16-gc118d0c
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=c118d0ce03910523ebd6cd533a410283640caf37 The branch, RHEL4 has been updated via c118d0ce03910523ebd6cd533a410283640caf37 (commit) via a623bf5bbecedd41e592d584c790f68fd218b569 (commit) from b2fb1017061f86f02f3cd864e10b44e9fa347441 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit c118d0ce03910523ebd6cd533a410283640caf37 Author: Bob Peterson [EMAIL PROTECTED] Date: Fri Mar 14 11:17:46 2008 -0500 Resolves: bz 421761: 'gfs_tool lockdump' wrongly says 'unknown mountpoint' re HP cciss RAID array commit a623bf5bbecedd41e592d584c790f68fd218b569 Author: Bob Peterson [EMAIL PROTECTED] Date: Fri Mar 14 11:09:09 2008 -0500 Resolves: bz 431945: GFS: gfs-kernel should use device major:minor --- Summary of changes: gfs-kernel/src/gfs/proc.c | 13 +++- gfs/gfs_tool/util.c | 64 +++-- 2 files changed, 21 insertions(+), 56 deletions(-) diff --git a/gfs-kernel/src/gfs/proc.c b/gfs-kernel/src/gfs/proc.c index b0edf1c..a79497b 100644 --- a/gfs-kernel/src/gfs/proc.c +++ b/gfs-kernel/src/gfs/proc.c @@ -27,6 +27,7 @@ #include lm.h #include proc.h #include super.h +#include diaper.h struct list_head gfs_fs_list; struct semaphore gfs_fs_lock; @@ -77,16 +78,21 @@ do_list(char *user_buf, size_t size) struct gfs_sbd *sdp = NULL; unsigned int x; char num[21]; + char device_id[32]; char *buf; int error = 0; + struct block_device *bdevice; down(gfs_fs_lock); x = 0; for (tmp = gfs_fs_list.next; tmp != gfs_fs_list; tmp = tmp-next) { sdp = list_entry(tmp, struct gfs_sbd, sd_list); + bdevice = gfs_diaper_2real(sdp-sd_vfs-s_bdev); + sprintf(device_id, %u:%u, MAJOR(bdevice-bd_dev), + MINOR(bdevice-bd_dev)); x += sprintf(num, %lu, (unsigned long)sdp) + - strlen(sdp-sd_vfs-s_id) + + strlen(device_id) + strlen(sdp-sd_fsname) + 3; } @@ -105,8 +111,11 @@ do_list(char *user_buf, size_t size) x = 0; for (tmp = gfs_fs_list.next; tmp != gfs_fs_list; tmp = tmp-next) { sdp = list_entry(tmp, struct gfs_sbd, sd_list); + bdevice = gfs_diaper_2real(sdp-sd_vfs-s_bdev); + sprintf(device_id, %u:%u, MAJOR(bdevice-bd_dev), + MINOR(bdevice-bd_dev)); x += sprintf(buf + x, %lu %s %s\n, -(unsigned long)sdp, sdp-sd_vfs-s_id, sdp-sd_fsname); +(unsigned long)sdp, device_id, sdp-sd_fsname); } if (copy_to_user(user_buf, buf, x)) diff --git a/gfs/gfs_tool/util.c b/gfs/gfs_tool/util.c index 4e0a868..3893c96 100644 --- a/gfs/gfs_tool/util.c +++ b/gfs/gfs_tool/util.c @@ -122,52 +122,6 @@ str2lines(char *str) } /** - * do_basename - Create dm-N style name for the device - * @device: - * - * Returns: Pointer to dm name or basename - */ - -static char * -do_basename(char *device) -{ - FILE *file; - int found = FALSE; - char line[256], major_name[256]; - unsigned int major_number; - struct stat st; - - file = fopen(/proc/devices, r); - if (!file) - goto punt; - - while (fgets(line, 256, file)) { - if (sscanf(line, %u %s, major_number, major_name) != 2) - continue; - if (strcmp(major_name, device-mapper) != 0) - continue; - found = TRUE; - break; - } - - fclose(file); - - if (!found) - goto punt; - - if (stat(device, st)) - goto punt; - if (major(st.st_rdev) == major_number) { - static char realname[16]; - snprintf(realname, 16, dm-%u, minor(st.st_rdev)); - return realname; - } - - punt: - return basename(device); -} - -/** * mp2cookie - Find the cookie for a filesystem given its mountpoint * @mp: * @ioctl_ok: If this is FALSE, it's not acceptable to open() the mountpoint @@ -181,9 +135,9 @@ mp2cookie(char *mp, int ioctl_ok) char *cookie; char *list, **lines; FILE *file; - char line[256], device[256]; - char *dev = NULL; + char line[256], device[256], dev_id[256]; unsigned int x; + struct stat st; cookie = malloc(256);
[Cluster-devel] Cluster Project branch, master, updated. gfs-kernel_0_1_22-73-gfebfaf4
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project Cluster Project. http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=febfaf415cb873716ff5f105f873ec8401607a29 The branch, master has been updated via febfaf415cb873716ff5f105f873ec8401607a29 (commit) from 48f20902219251eacf28ec99bc98a17bff192e71 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit febfaf415cb873716ff5f105f873ec8401607a29 Author: Bob Peterson [EMAIL PROTECTED] Date: Tue Mar 11 18:23:11 2008 -0500 Resolves: bz 435917: GFS2: mkfs.gfs2 default lock protocol differs from man page --- Summary of changes: gfs2/man/mkfs.gfs2.8 |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gfs2/man/mkfs.gfs2.8 b/gfs2/man/mkfs.gfs2.8 index c68ff8d..b411467 100644 --- a/gfs2/man/mkfs.gfs2.8 +++ b/gfs2/man/mkfs.gfs2.8 @@ -48,10 +48,10 @@ the filesystem. .TP \fB-p\fP \fILockProtoName\fR LockProtoName is the name of the locking protocol to use. Acceptable -locking protocols are \fIlock_dlm\fR or if you are using GFS2 -as a local filesystem (\fB1 node only\fP), you can specify the +locking protocols are \fIlock_dlm\fR (for shared storage) or if you are +using GFS2 as a local filesystem (\fB1 node only\fP), you can specify the \fIlock_nolock\fR protocol. If this option is not specified, -\fIlock_nolock\fR protocol will be assumed. +\fIlock_dlm\fR protocol will be assumed. .TP \fB-q\fP Be quiet. Don't print anything. hooks/post-receive -- Cluster Project
[Cluster-devel] cluster/gfs-kernel/src/gfs ioctl.c
CVSROOT:/cvs/cluster Module name:cluster Branch: RHEL5 Changes by: [EMAIL PROTECTED] 2008-02-05 21:12:52 Modified files: gfs-kernel/src/gfs: ioctl.c Log message: Resolves: 430154: gfs_tool doesn't recognize GFS file system Forgot to take the off the ioctl for get_file_meta_quota. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/ioctl.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.13.2.6r2=1.13.2.7 --- cluster/gfs-kernel/src/gfs/ioctl.c 2008/01/24 20:51:46 1.13.2.6 +++ cluster/gfs-kernel/src/gfs/ioctl.c 2008/02/05 21:12:52 1.13.2.7 @@ -1490,7 +1490,7 @@ else if (strcmp(arg0, get_file_meta) == 0) error = gi_get_file_meta(ip, gi); else if (strcmp(arg0, get_file_meta_quota) == 0) - error = gi_get_file_meta(ip-i_sbd-sd_qinode, gi); + error = gi_get_file_meta(ip-i_sbd-sd_qinode, gi); else if (strcmp(arg0, do_file_flush) == 0) error = gi_do_file_flush(ip, gi); else if (strcmp(arg0, get_hfile_stat) == 0)
[Cluster-devel] cluster/gfs2/man gfs2.8
CVSROOT:/cvs/cluster Module name:cluster Changes by: [EMAIL PROTECTED] 2008-01-26 14:20:58 Modified files: gfs2/man : gfs2.8 Log message: Resolves: bz 223660: man gfs2(8) refers to the gfs2_mkfs manpage Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/man/gfs2.8.diff?cvsroot=clusterr1=1.3r2=1.4 --- cluster/gfs2/man/gfs2.8 2008/01/02 11:48:54 1.3 +++ cluster/gfs2/man/gfs2.8 2008/01/26 14:20:57 1.4 @@ -20,8 +20,11 @@ gfs2_mount Mounting a GFS2 file system .TP +gfs2_edit +A GFS2 debug tool (use with caution) +.TP gfs2_fsck -The GFS2 file system checker (Still Missing) +The GFS2 file system checker .TP gfs2_grow Growing a GFS2 file system @@ -29,7 +32,7 @@ gfs2_jadd Adding a journal to a GFS2 file system .TP -gfs2_mkfs +mkfs.gfs2 Make a GFS2 file system .TP gfs2_quota
[Cluster-devel] cluster/gfs-kernel/src/gfs gfs_ioctl.h ioctl.c ...
CVSROOT:/cvs/cluster Module name:cluster Branch: RHEL5 Changes by: [EMAIL PROTECTED] 2008-01-24 20:51:46 Modified files: gfs-kernel/src/gfs: gfs_ioctl.h ioctl.c ioctl.h ops_file.c Log message: Resolves: bz 429633: gfs_tool doesn't recognize GFS file sytem Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/gfs_ioctl.h.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.11r2=1.11.2.1 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/ioctl.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.13.2.5r2=1.13.2.6 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/ioctl.h.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.3r2=1.3.2.1 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/ops_file.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.28.2.3r2=1.28.2.4 --- cluster/gfs-kernel/src/gfs/gfs_ioctl.h 2006/07/10 23:22:34 1.11 +++ cluster/gfs-kernel/src/gfs/gfs_ioctl.h 2008/01/24 20:51:46 1.11.2.1 @@ -22,12 +22,23 @@ #define GFS_IOCTL_SUPER _GFSC_(45) struct gfs_ioctl { - unsigned int gi_argc; - char **gi_argv; +unsigned int gi_argc; +char **gi_argv; char __user *gi_data; +unsigned int gi_size; +uint64_t gi_offset; +}; + +#ifdef CONFIG_COMPAT +struct gfs_ioctl_compat { + unsigned int gi_argc; + uint32_t gi_argv; + + uint32_t gi_data; unsigned int gi_size; uint64_t gi_offset; }; +#endif #endif /* ___GFS_IOCTL_DOT_H__ */ --- cluster/gfs-kernel/src/gfs/ioctl.c 2008/01/24 18:30:17 1.13.2.5 +++ cluster/gfs-kernel/src/gfs/ioctl.c 2008/01/24 20:51:46 1.13.2.6 @@ -19,6 +19,7 @@ #include linux/completion.h #include linux/buffer_head.h #include asm/uaccess.h +#include linux/compat.h #include gfs_ioctl.h #include gfs.h @@ -509,7 +510,7 @@ */ static int -gi_set_tune(struct gfs_sbd *sdp, struct gfs_ioctl *gi) +gi_set_tune(struct gfs_sbd *sdp, struct gfs_ioctl *gi, int from_user) { struct gfs_tune *gt = sdp-sd_tune; char param[ARG_SIZE], value[ARG_SIZE]; @@ -521,12 +522,21 @@ if (gi-gi_argc != 3) return -EINVAL; - if (strncpy_from_user(param, gi-gi_argv[1], ARG_SIZE) 0) - return -EFAULT; + if (from_user) { + if (strncpy_from_user(param, gi-gi_argv[1], ARG_SIZE) 0) + return -EFAULT; + } else { + strncpy(param, gi-gi_argv[1], ARG_SIZE); + } param[ARG_SIZE - 1] = 0; - if (strncpy_from_user(value, gi-gi_argv[2], ARG_SIZE) 0) - return -EFAULT; + if (from_user) { + if (strncpy_from_user(value, gi-gi_argv[2], ARG_SIZE) 0) + return -EFAULT; + } else { + strncpy(value, gi-gi_argv[2], ARG_SIZE); + } + value[ARG_SIZE - 1] = 0; if (strcmp(param, ilimit1) == 0) { @@ -884,7 +894,7 @@ */ static int -gi_set_file_flag(struct gfs_inode *ip, struct gfs_ioctl *gi) +gi_set_file_flag(struct gfs_inode *ip, struct gfs_ioctl *gi, int from_user) { char buf[ARG_SIZE]; int set; @@ -896,8 +906,12 @@ if (gi-gi_argc != 3) return -EINVAL; - if (strncpy_from_user(buf, gi-gi_argv[1], ARG_SIZE) 0) - return -EFAULT; + if (from_user) { + if (strncpy_from_user(buf, gi-gi_argv[1], ARG_SIZE) 0) + return -EFAULT; + } else { + strncpy(buf, gi-gi_argv[1], ARG_SIZE); + } buf[ARG_SIZE - 1] = 0; if (strcmp(buf, set) == 0) @@ -907,8 +921,12 @@ else return -EINVAL; -if (strncpy_from_user(buf, gi-gi_argv[2], ARG_SIZE) 0) -return -EFAULT; + if (from_user) { + if (strncpy_from_user(buf, gi-gi_argv[2], ARG_SIZE) 0) + return -EFAULT; + } else { + strncpy(buf, gi-gi_argv[2], ARG_SIZE); + } buf[ARG_SIZE - 1] = 0; error = gfs_glock_nq_init(ip-i_gl, LM_ST_EXCLUSIVE, 0, i_gh); @@ -1065,15 +1083,19 @@ */ static struct gfs_inode * -gi2hip(struct gfs_sbd *sdp, struct gfs_ioctl *gi) +gi2hip(struct gfs_sbd *sdp, struct gfs_ioctl *gi, int from_user) { char buf[ARG_SIZE]; if (gi-gi_argc != 2) return ERR_PTR(-EINVAL); -if (strncpy_from_user(buf, gi-gi_argv[1], ARG_SIZE) 0) -return ERR_PTR(-EFAULT); + if (from_user) { + if (strncpy_from_user(buf, gi-gi_argv[1], ARG_SIZE) 0) + return ERR_PTR(-EFAULT); + } else { + strncpy(buf, gi-gi_argv[1], ARG_SIZE); + } buf[ARG_SIZE - 1] = 0; if (strcmp(buf, jindex) == 0) @@ -1097,14 +1119,14 @@ */ static int -gi_get_hfile_stat(struct gfs_sbd *sdp, struct gfs_ioctl *gi) +gi_get_hfile_stat(struct gfs_sbd *sdp, struct
[Cluster-devel] cluster/gfs-kernel/src/gfs gfs_ioctl.h ioctl.c ...
CVSROOT:/cvs/cluster Module name:cluster Branch: RHEL51 Changes by: [EMAIL PROTECTED] 2008-01-24 21:25:41 Modified files: gfs-kernel/src/gfs: gfs_ioctl.h ioctl.c ioctl.h ops_file.c Log message: Resolves: bz 430154: gfs_tool doesn't recognize GFS file sytem Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/gfs_ioctl.h.diff?cvsroot=clusteronly_with_tag=RHEL51r1=1.11r2=1.11.6.1 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/ioctl.c.diff?cvsroot=clusteronly_with_tag=RHEL51r1=1.13.2.4r2=1.13.2.4.2.1 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/ioctl.h.diff?cvsroot=clusteronly_with_tag=RHEL51r1=1.3r2=1.3.6.1 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/ops_file.c.diff?cvsroot=clusteronly_with_tag=RHEL51r1=1.28.2.2r2=1.28.2.2.2.1 --- cluster/gfs-kernel/src/gfs/gfs_ioctl.h 2006/07/10 23:22:34 1.11 +++ cluster/gfs-kernel/src/gfs/gfs_ioctl.h 2008/01/24 21:25:41 1.11.6.1 @@ -22,12 +22,23 @@ #define GFS_IOCTL_SUPER _GFSC_(45) struct gfs_ioctl { - unsigned int gi_argc; - char **gi_argv; +unsigned int gi_argc; +char **gi_argv; char __user *gi_data; +unsigned int gi_size; +uint64_t gi_offset; +}; + +#ifdef CONFIG_COMPAT +struct gfs_ioctl_compat { + unsigned int gi_argc; + uint32_t gi_argv; + + uint32_t gi_data; unsigned int gi_size; uint64_t gi_offset; }; +#endif #endif /* ___GFS_IOCTL_DOT_H__ */ --- cluster/gfs-kernel/src/gfs/ioctl.c 2007/06/19 14:47:07 1.13.2.4 +++ cluster/gfs-kernel/src/gfs/ioctl.c 2008/01/24 21:25:41 1.13.2.4.2.1 @@ -19,6 +19,7 @@ #include linux/completion.h #include linux/buffer_head.h #include asm/uaccess.h +#include linux/compat.h #include gfs_ioctl.h #include gfs.h @@ -509,7 +510,7 @@ */ static int -gi_set_tune(struct gfs_sbd *sdp, struct gfs_ioctl *gi) +gi_set_tune(struct gfs_sbd *sdp, struct gfs_ioctl *gi, int from_user) { struct gfs_tune *gt = sdp-sd_tune; char param[ARG_SIZE], value[ARG_SIZE]; @@ -521,12 +522,21 @@ if (gi-gi_argc != 3) return -EINVAL; - if (strncpy_from_user(param, gi-gi_argv[1], ARG_SIZE) 0) - return -EFAULT; + if (from_user) { + if (strncpy_from_user(param, gi-gi_argv[1], ARG_SIZE) 0) + return -EFAULT; + } else { + strncpy(param, gi-gi_argv[1], ARG_SIZE); + } param[ARG_SIZE - 1] = 0; - if (strncpy_from_user(value, gi-gi_argv[2], ARG_SIZE) 0) - return -EFAULT; + if (from_user) { + if (strncpy_from_user(value, gi-gi_argv[2], ARG_SIZE) 0) + return -EFAULT; + } else { + strncpy(value, gi-gi_argv[2], ARG_SIZE); + } + value[ARG_SIZE - 1] = 0; if (strcmp(param, ilimit1) == 0) { @@ -884,7 +894,7 @@ */ static int -gi_set_file_flag(struct gfs_inode *ip, struct gfs_ioctl *gi) +gi_set_file_flag(struct gfs_inode *ip, struct gfs_ioctl *gi, int from_user) { char buf[ARG_SIZE]; int set; @@ -896,8 +906,12 @@ if (gi-gi_argc != 3) return -EINVAL; - if (strncpy_from_user(buf, gi-gi_argv[1], ARG_SIZE) 0) - return -EFAULT; + if (from_user) { + if (strncpy_from_user(buf, gi-gi_argv[1], ARG_SIZE) 0) + return -EFAULT; + } else { + strncpy(buf, gi-gi_argv[1], ARG_SIZE); + } buf[ARG_SIZE - 1] = 0; if (strcmp(buf, set) == 0) @@ -907,8 +921,12 @@ else return -EINVAL; -if (strncpy_from_user(buf, gi-gi_argv[2], ARG_SIZE) 0) -return -EFAULT; + if (from_user) { + if (strncpy_from_user(buf, gi-gi_argv[2], ARG_SIZE) 0) + return -EFAULT; + } else { + strncpy(buf, gi-gi_argv[2], ARG_SIZE); + } buf[ARG_SIZE - 1] = 0; error = gfs_glock_nq_init(ip-i_gl, LM_ST_EXCLUSIVE, 0, i_gh); @@ -1065,15 +1083,19 @@ */ static struct gfs_inode * -gi2hip(struct gfs_sbd *sdp, struct gfs_ioctl *gi) +gi2hip(struct gfs_sbd *sdp, struct gfs_ioctl *gi, int from_user) { char buf[ARG_SIZE]; if (gi-gi_argc != 2) return ERR_PTR(-EINVAL); -if (strncpy_from_user(buf, gi-gi_argv[1], ARG_SIZE) 0) -return ERR_PTR(-EFAULT); + if (from_user) { + if (strncpy_from_user(buf, gi-gi_argv[1], ARG_SIZE) 0) + return ERR_PTR(-EFAULT); + } else { + strncpy(buf, gi-gi_argv[1], ARG_SIZE); + } buf[ARG_SIZE - 1] = 0; if (strcmp(buf, jindex) == 0) @@ -1097,14 +1119,14 @@ */ static int -gi_get_hfile_stat(struct gfs_sbd *sdp, struct gfs_ioctl *gi) +gi_get_hfile_stat(struct gfs_sbd
[Cluster-devel] cluster/gfs2/man gfs2_tool.8
CVSROOT:/cvs/cluster Module name:cluster Changes by: [EMAIL PROTECTED] 2008-01-09 21:30:20 Modified files: gfs2/man : gfs2_tool.8 Log message: Resolves: bz 426670: GFS2: man page for gfs2_tool has commented lockdump section Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/man/gfs2_tool.8.diff?cvsroot=clusterr1=1.7r2=1.8 --- cluster/gfs2/man/gfs2_tool.82007/11/14 17:18:09 1.7 +++ cluster/gfs2/man/gfs2_tool.82008/01/09 21:30:20 1.8 @@ -61,12 +61,10 @@ represents the mounted filesystem. 2) The name of the device that holds the filesystem (well, the name as the Linux kernel knows it). -.\.TP -.\\fBlockdump\fP \fIMountPoint\fR \fI[buffersize]\fR -.\Print out information about the locks this machine holds for a given -.\filesystem. Buffersize is the size of the buffer (in bytes) that gfs2_tool -.\allocates to store the lock data during processing. It defaults to 4194304 -.\bytes. +.TP +\fBlockdump\fP \fIMountPoint\fR +Print out information about the locks this machine holds for a given +filesystem. .\.TP .\\fBmargs\fP \fIarguments\fR .\This loads arguments into the module what will override the mount
[Cluster-devel] cluster/gfs2/man gfs2_tool.8
CVSROOT:/cvs/cluster Module name:cluster Branch: RHEL5 Changes by: [EMAIL PROTECTED] 2008-01-09 21:30:50 Modified files: gfs2/man : gfs2_tool.8 Log message: Resolves: bz 426670: GFS2: man page for gfs2_tool has commented lockdump section Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/man/gfs2_tool.8.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.3.2.4r2=1.3.2.5 --- cluster/gfs2/man/gfs2_tool.82007/11/14 17:18:39 1.3.2.4 +++ cluster/gfs2/man/gfs2_tool.82008/01/09 21:30:49 1.3.2.5 @@ -61,12 +61,10 @@ represents the mounted filesystem. 2) The name of the device that holds the filesystem (well, the name as the Linux kernel knows it). -.\.TP -.\\fBlockdump\fP \fIMountPoint\fR \fI[buffersize]\fR -.\Print out information about the locks this machine holds for a given -.\filesystem. Buffersize is the size of the buffer (in bytes) that gfs2_tool -.\allocates to store the lock data during processing. It defaults to 4194304 -.\bytes. +.TP +\fBlockdump\fP \fIMountPoint\fR +Print out information about the locks this machine holds for a given +filesystem. .\.TP .\\fBmargs\fP \fIarguments\fR .\This loads arguments into the module what will override the mount
[Cluster-devel] cluster/gfs2/edit hexedit.h savemeta.c
CVSROOT:/cvs/cluster Module name:cluster Branch: RHEL5 Changes by: [EMAIL PROTECTED] 2007-11-28 16:49:06 Modified files: gfs2/edit : hexedit.h savemeta.c Log message: Resolves: bz 402971: GFS2: gfs2_edit savemeta doesn't save rindex file. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/edit/hexedit.h.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.4.2.6r2=1.4.2.7 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/edit/savemeta.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.1.2.3r2=1.1.2.4 --- cluster/gfs2/edit/hexedit.h 2007/11/16 19:42:34 1.4.2.6 +++ cluster/gfs2/edit/hexedit.h 2007/11/28 16:49:06 1.4.2.7 @@ -136,6 +136,7 @@ }; EXTERN int block_is_jindex(void); +EXTERN int block_is_rindex(void); EXTERN int block_is_inum_file(void); EXTERN int block_is_statfs_file(void); EXTERN int block_is_quota_file(void); --- cluster/gfs2/edit/savemeta.c2007/11/16 19:42:34 1.1.2.3 +++ cluster/gfs2/edit/savemeta.c2007/11/28 16:49:06 1.1.2.4 @@ -383,7 +383,7 @@ struct gfs2_meta_header mh; *block_type = 0; - *struct_len = 0; + *struct_len = bufsize; gfs2_meta_header_in(mh, buf); if (mh.mh_magic != GFS2_MAGIC) @@ -492,6 +492,7 @@ block_is_inum_file() || block_is_statfs_file() || block_is_quota_file() || + block_is_rindex() || block_is_a_journal(); } @@ -501,6 +502,12 @@ uint16_t trailing0; char *p; + if (blk last_fs_block) { + fprintf(stderr, \nWarning: bad block pointer ignored in + block (block %llu (%llx)), + (unsigned long long)block, (unsigned long long)block); + return 0; + } memset(savedata, 0, sizeof(struct saved_metablock)); do_lseek(fd, blk * bufsize); do_read(fd, savedata-buf, bufsize); /* read in the block */ @@ -536,12 +543,11 @@ void save_indirect_blocks(int out_fd, osi_list_t *cur_list, struct gfs2_buffer_head *mybh, int height, int hgt) { - uint64_t old_block = 0, starting_block; + uint64_t old_block = 0, indir_block; uint64_t *ptr; int head_size; struct gfs2_buffer_head *nbh; - starting_block = block; /* remember where we started */ head_size = (hgt 1 ? sizeof(struct gfs2_meta_header) : sizeof(struct gfs2_dinode)); @@ -550,19 +556,18 @@ (char *)ptr (mybh-b_data + mybh-b_size); ptr++) { if (!*ptr) continue; - block = be64_to_cpu(*ptr); - if (block == old_block) + indir_block = be64_to_cpu(*ptr); + if (indir_block == old_block) continue; - old_block = block; - save_block(sbd.device_fd, out_fd, block); + old_block = indir_block; + save_block(sbd.device_fd, out_fd, indir_block); if (height != hgt) { /* If not at max height */ - nbh = bread(sbd, block); + nbh = bread(sbd, indir_block); osi_list_add_prev(nbh-b_altlist, cur_list); brelse(nbh, not_updated); } } /* for all data on the indirect block */ - block = starting_block; /* go back to where we started */ } /* @@ -632,28 +637,37 @@ } if (inode-i_di.di_eattr) { /* if this inode has extended attributes */ struct gfs2_ea_header ea; + struct gfs2_meta_header mh; int e; metabh = bread(sbd, inode-i_di.di_eattr); save_block(sbd.device_fd, out_fd, inode-i_di.di_eattr); - for (e = sizeof(struct gfs2_meta_header); -e bufsize; e += ea.ea_rec_len) { - uint64_t blk, *b; - int charoff; - - gfs2_ea_header_in(ea, metabh-b_data + e); - for (i = 0; i ea.ea_num_ptrs; i++) { - charoff = e + ea.ea_name_len + - sizeof(struct gfs2_ea_header) + - sizeof(uint64_t) - 1; - charoff /= sizeof(uint64_t); - b = (uint64_t *)(metabh-b_data); - b += charoff + i; - blk = be64_to_cpu(*b); - save_block(sbd.device_fd, out_fd, blk); + gfs2_meta_header_in(mh, metabh-b_data); + if (mh.mh_magic == GFS2_MAGIC) { + for (e = sizeof(struct gfs2_meta_header); +e bufsize; e += ea.ea_rec_len) { +
[Cluster-devel] cluster/gfs2/fsck metawalk.c pass1.c pass1c.c ...
CVSROOT:/cvs/cluster Module name:cluster Branch: RHEL5 Changes by: [EMAIL PROTECTED] 2007-11-16 23:22:23 Modified files: gfs2/fsck : metawalk.c pass1.c pass1c.c pass2.c pass5.c Log message: Resolves: bz 382581: GFS2: gfs2_fsck: buffer still held for block Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/metawalk.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.3.2.10r2=1.3.2.11 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/pass1.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.4.2.7r2=1.4.2.8 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/pass1c.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.4.2.3r2=1.4.2.4 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/pass2.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.4.2.5r2=1.4.2.6 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/pass5.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.3.2.2r2=1.3.2.3 --- cluster/gfs2/fsck/metawalk.c2007/09/18 18:14:27 1.3.2.10 +++ cluster/gfs2/fsck/metawalk.c2007/11/16 23:22:23 1.3.2.11 @@ -463,9 +463,11 @@ if(error 0) { return 1; } + check_eattr_entries(ip, bh, pass); + if (bh) + brelse(bh, not_updated); } - check_eattr_entries(ip, bh, pass); return 0; } @@ -487,9 +489,9 @@ log_debug(Checking EA indirect block #%PRIu64 (0x% PRIx64 ).\n, indirect, indirect); - if (!pass-check_eattr_indir || + if (pass-check_eattr_indir !pass-check_eattr_indir(ip, indirect, ip-i_di.di_num.no_addr, -indirect_buf, pass-private)) { +indirect_buf, pass-private)) { ea_leaf_ptr = (uint64_t *)(indirect_buf-b_data + sizeof(struct gfs2_meta_header)); end = ea_leaf_ptr + ((sdp-sd_sb.sb_bsize --- cluster/gfs2/fsck/pass1.c 2007/10/11 20:32:36 1.4.2.7 +++ cluster/gfs2/fsck/pass1.c 2007/11/16 23:22:23 1.4.2.8 @@ -143,7 +143,6 @@ int ret = 0; struct gfs2_block_query q = {0}; struct block_count *bc = (struct block_count *) private; - uint64_t block; /* This inode contains an eattr - it may be invalid, but the * eattr attributes points to a non-zero block */ @@ -167,23 +166,27 @@ ret = 1; } else { - log_debug(Setting % PRIu64 (0x% - PRIx64 ) to eattr block\n, indirect, indirect); - gfs2_block_set(bl, indirect, gfs2_eattr_block); + log_debug(Marking inode % PRIu64 (0x% + PRIx64 ) with eattr block\n, + ip-i_di.di_num.no_addr, ip-i_di.di_num.no_addr); + /* Mark the inode as having an eattr in the block map + so pass1c can check it. */ + gfs2_block_mark(bl, ip-i_di.di_num.no_addr, gfs2_eattr_block); *bh = bread(sdp, indirect); - block = be64_to_cpu(*(*bh)-b_data); if(gfs2_check_meta(*bh, GFS2_METATYPE_IN)) { log_warn(EA indirect block % PRIu64 (0x% PRIx64 -) has incorrect type.\n, block, block); - gfs2_block_set(bl, block, gfs2_meta_inval); +) has incorrect type.\n, +indirect, indirect); + gfs2_block_set(bl, indirect, gfs2_meta_inval); ret = 1; + brelse(*bh, not_updated); } else { /* FIXME: do i need to differentiate this as an ea_indir? */ log_debug(Setting % PRIu64 (0x% PRIx64 - ) to indirect block\n, block, block); - gfs2_block_set(bl, block, gfs2_indir_blk); + ) to indirect block\n, indirect, indirect); + gfs2_block_set(bl, indirect, gfs2_indir_blk); bc-ea_count++; } } @@ -293,6 +296,7 @@ ip-i_di.di_num.no_addr); gfs2_block_set(bl, block, gfs2_meta_inval); ret = -1; + brelse(leaf_bh, not_updated); } else { log_debug(Setting block % PRIu64 (0x% PRIx64 @@ -300,7 +304,6 @@ gfs2_block_set(bl, block, gfs2_meta_eattr); bc-ea_count++; } - brelse(leaf_bh, not_updated); } *bh = leaf_bh; --- cluster/gfs2/fsck/pass1c.c 2007/09/18 18:14:27 1.4.2.3
[Cluster-devel] cluster/gfs2/edit gfs2hex.c hexedit.c savemeta.c
CVSROOT:/cvs/cluster Module name:cluster Changes by: [EMAIL PROTECTED] 2007-11-15 20:32:42 Modified files: gfs2/edit : gfs2hex.c hexedit.c savemeta.c Log message: Added ability to save inode extended attributes in savemeta. This is necessary for in order to test bug #382581. Added ability to recurse one level on directories when printing. Fixed bugs associated with traversing directory leaf blocks. Added ability to recognize and display log buffer and quota change blocks. Simplified code by breaking up display_indirect into two functions: one for indirect blocks, the other for directory leaf blocks. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/edit/gfs2hex.c.diff?cvsroot=clusterr1=1.13r2=1.14 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/edit/hexedit.c.diff?cvsroot=clusterr1=1.25r2=1.26 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/edit/savemeta.c.diff?cvsroot=clusterr1=1.5r2=1.6 --- cluster/gfs2/edit/gfs2hex.c 2007/11/13 17:22:06 1.13 +++ cluster/gfs2/edit/gfs2hex.c 2007/11/15 20:32:42 1.14 @@ -345,20 +345,32 @@ ** *** **/ -void do_leaf_extended(char *buf) +void do_leaf_extended(char *buf, struct iinfo *indir) { + int x, i; struct gfs2_dirent de; - unsigned int x; - - eol(0); - print_gfs2(Directory Entries:); - eol(0); - for (x = sizeof(struct gfs2_leaf); x bufsize; x += de.de_rec_len) { - eol(0); - gfs2_dirent_in(de, buf + x); - if (de.de_inum.no_addr) - gfs2_dirent_print(de, buf + x + sizeof(struct gfs2_dirent)); + x = 0; + memset(indir, 0, sizeof(indir)); + /* Directory Entries: */ + for (i = sizeof(struct gfs2_leaf); i bufsize; +i += de.de_rec_len) { + gfs2_dirent_in(de, buf + i); + if (de.de_inum.no_addr) { + indir-ii[0].block = de.de_inum.no_addr; + indir-ii[0].dirent[x].block = de.de_inum.no_addr; + memcpy(indir-ii[0].dirent[x].dirent, + de, sizeof(struct gfs2_dirent)); + memcpy(indir-ii[0].dirent[x].filename, + buf + i + sizeof(struct gfs2_dirent), + de.de_name_len); + indir-ii[0].dirent[x].filename[de.de_name_len] = '\0'; + indir-ii[0].is_dir = TRUE; + indir-ii[0].dirents++; + x++; + } + if (de.de_rec_len = sizeof(struct gfs2_dirent)) + break; } } @@ -466,6 +478,7 @@ struct gfs_log_header lh1; struct gfs2_log_header lh; struct gfs2_log_descriptor ld; + struct gfs2_quota_change qc; uint32_t magic; @@ -545,7 +558,7 @@ case GFS2_METATYPE_EA: print_gfs2(Eattr Block:); eol(0); - gfs2_meta_header_print(mh); + do_eattr_extended(buf); break; case GFS2_METATYPE_ED: @@ -554,6 +567,19 @@ gfs2_meta_header_print(mh); break; + case GFS2_METATYPE_LB: + print_gfs2(Log Buffer); + eol(0); + gfs2_meta_header_print(mh); + break; + + case GFS2_METATYPE_QC: + print_gfs2(Quota Change); + eol(0); + gfs2_quota_change_in(qc, buf); + gfs2_quota_change_print(qc); + break; + default: print_gfs2(Unknown metadata type); eol(0); --- cluster/gfs2/edit/hexedit.c 2007/11/13 17:22:06 1.25 +++ cluster/gfs2/edit/hexedit.c 2007/11/15 20:32:42 1.26 @@ -46,6 +46,7 @@ int display(int identify_only); extern void eol(int col); +extern void do_leaf_extended(char *buf, struct iinfo *indir); extern int do_indirect_extended(char *buf, struct iinfo *ii); extern void savemeta(const char *out_fn, int slow); extern void restoremeta(const char *in_fn, const char *out_device, @@ -414,7 +415,7 @@ struct_len = sizeof(struct gfs2_meta_header); break; case GFS2_METATYPE_LF: /* 6 */ - print_gfs2((leaf dinode blklst)); + print_gfs2((directory leaf)); struct_len = sizeof(struct gfs2_leaf); break; case GFS2_METATYPE_JD: @@
[Cluster-devel] cluster/gfs2/libgfs2 ondisk.c
CVSROOT:/cvs/cluster Module name:cluster Changes by: [EMAIL PROTECTED] 2007-11-15 21:49:28 Modified files: gfs2/libgfs2 : ondisk.c Log message: gfs2_edit wasn't printing directory entries and extended attributes correctly. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/ondisk.c.diff?cvsroot=clusterr1=1.8r2=1.9 --- cluster/gfs2/libgfs2/ondisk.c 2007/10/11 20:27:48 1.8 +++ cluster/gfs2/libgfs2/ondisk.c 2007/11/15 21:49:27 1.9 @@ -386,7 +386,7 @@ memset(buf, 0, GFS2_FNAMESIZE + 1); memcpy(buf, name, de-de_name_len); - printf( name = %s\n, buf); + print_it( name, %s, NULL, buf); } void gfs2_leaf_in(struct gfs2_leaf *lf, char *buf) @@ -462,7 +462,7 @@ memset(buf, 0, GFS2_EA_MAX_NAME_LEN + 1); memcpy(buf, name, ea-ea_name_len); - printf( name = %s\n, buf); + print_it( name, %s, NULL, buf); } void gfs2_log_header_in(struct gfs2_log_header *lh, char *buf)
[Cluster-devel] cluster/gfs2/man gfs2_edit.8
CVSROOT:/cvs/cluster Module name:cluster Changes by: [EMAIL PROTECTED] 2007-11-15 21:50:35 Modified files: gfs2/man : gfs2_edit.8 Log message: Add the printsavedmeta option to the gfs2_edit man page. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/man/gfs2_edit.8.diff?cvsroot=clusterr1=1.3r2=1.4 --- cluster/gfs2/man/gfs2_edit.82007/10/12 21:38:18 1.3 +++ cluster/gfs2/man/gfs2_edit.82007/11/15 21:50:35 1.4 @@ -104,6 +104,10 @@ printed but not modified. If \fInew_value\fR is specified, the rg_flags field will be overwritten with the new value. .TP +\fBprintsavedmeta\fP \fIfilename\fR +Print off a list of blocks from filename that were saved with the savemeta +option. +.TP \fBsavemeta\fP \fIdevice\fR \fIfilename\fR Save off the GFS2 metadata (not user data) for the file system on the specified device to a file given by filename. You can use this option
[Cluster-devel] cluster/gfs2 man/gfs2_tool.8 tool/df.c tool/main.c
CVSROOT:/cvs/cluster Module name:cluster Branch: RHEL5 Changes by: [EMAIL PROTECTED] 2007-11-14 17:18:39 Modified files: gfs2/man : gfs2_tool.8 gfs2/tool : df.c main.c Log message: Resolves: bz 352841: GFS2: Evaluate and implement missing gfs2_tool features Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/man/gfs2_tool.8.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.3.2.3r2=1.3.2.4 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/df.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.7.2.1r2=1.7.2.2 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/main.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.4.2.3r2=1.4.2.4 --- cluster/gfs2/man/gfs2_tool.82007/11/07 21:15:13 1.3.2.3 +++ cluster/gfs2/man/gfs2_tool.82007/11/14 17:18:39 1.3.2.4 @@ -21,10 +21,10 @@ \fBcounters\fP \fIMountPoint\fR [-c] Print out statistics about a filesystem. If -c is used, gfs2_tool continues to run printing out the stats once a second. -.\.TP -.\\fBdf\fP \fIMountPoint\fR -.\Print out a space usage summary of a given filesystem. The information -.\printed is more detailed than a standard df. +.TP +\fBdf\fP \fIMountPoint\fR +Print out a space usage summary of a given filesystem. The information +printed is more detailed than a standard df. .\.TP .\\fBflush\fP \fIFile\fR .\Sync out any dirty data for a file and drop its lock. --- cluster/gfs2/tool/df.c 2007/10/25 14:14:47 1.7.2.1 +++ cluster/gfs2/tool/df.c 2007/11/14 17:18:39 1.7.2.2 @@ -31,9 +31,6 @@ #include gfs2_tool.h #include libgfs2.h -#define SIZE (65536) - -#if GFS2_TOOL_FEATURE_IMPLEMENTED /** * do_df_one - print out information about one filesystem * @path: the path to the filesystem @@ -43,98 +40,68 @@ static void do_df_one(char *path) { - struct gfs2_ioctl gi; - /* char stat_gfs2[SIZE]; */ - /* unsigned int percentage; */ - struct gfs2_sb sb; - struct gfs2_dinode ji, ri; - unsigned int journals = 0; + unsigned int percentage; + unsigned int journals; uint64_t rgrps; unsigned int flags; - char *fs, *value; - int error; + char *value, *fs; + int x, statfs_fd; struct gfs2_sbd sbd; + char buf[GFS2_DEFAULT_BSIZE], statfs_fn[PATH_MAX]; + struct gfs2_statfs_change sc; + memset(sbd, 0, sizeof(struct gfs2_sbd)); sbd.path_name = path; check_for_gfs2(sbd); + fs = mp2fsname(sbd.path_name); - sbd.device_fd = open(path, O_RDONLY); + sbd.device_fd = open(sbd.device_name, O_RDONLY); if (sbd.device_fd 0) die(can't open %s: %s\n, path, strerror(errno)); - fs = mp2fsname(path); - - /* - strncpy(stat_gfs2, __get_sysfs(fs, statfs), SIZE); - stat_gfs2[SIZE - 1] = '\0'; - */ - - { - char *argv[] = { get_super }; + sbd.bsize = GFS2_DEFAULT_BSIZE; + sbd.jsize = GFS2_DEFAULT_JSIZE; + sbd.rgsize = GFS2_DEFAULT_RGSIZE; + sbd.utsize = GFS2_DEFAULT_UTSIZE; + sbd.qcsize = GFS2_DEFAULT_QCSIZE; + osi_list_init(sbd.rglist); + osi_list_init(sbd.buf_list); + for (x = 0; x BUF_HASH_SIZE; x++) + osi_list_init(sbd.buf_hash[x]); + do_lseek(sbd.device_fd, 0x10 * sbd.bsize); + do_read(sbd.device_fd, buf, sbd.bsize); /* read in the superblock */ - gi.gi_argc = 1; - gi.gi_argv = argv; - gi.gi_data = (char *)sb; - gi.gi_size = sizeof(struct gfs2_sb); - - error = ioctl(sbd.device_fd, GFS2_IOCTL_SUPER, gi); - if (error != gi.gi_size) - die(error doing get_super (%d): %s\n, - error, strerror(errno)); - } - { - char *argv[] = { get_hfile_stat, -jindex }; + compute_constants(sbd); + gfs2_sb_in(sbd.sd_sb, buf); /* parse it out into the sb structure */ - gi.gi_argc = 2; - gi.gi_argv = argv; - gi.gi_data = (char *)ji; - gi.gi_size = sizeof(struct gfs2_dinode); - - error = ioctl(sbd.device_fd, GFS2_IOCTL_SUPER, gi); - if (error != gi.gi_size) - die(error doing get_hfile_stat for jindex (%d): %s\n, - error, strerror(errno)); - } - { - char *argv[] = { get_hfile_stat, -rindex }; - - gi.gi_argc = 2; - gi.gi_argv = argv; - gi.gi_data = (char *)ri; - gi.gi_size = sizeof(struct gfs2_dinode); - - error = ioctl(sbd.device_fd, GFS2_IOCTL_SUPER, gi); - if (error != gi.gi_size) - die(error doing get_hfile_stat for rindex (%d): %s\n, - error,
[Cluster-devel] cluster/gfs2 edit/hexedit.h fsck/initialize.c ...
CVSROOT:/cvs/cluster Module name:cluster Branch: RHEL5 Changes by: [EMAIL PROTECTED] 2007-11-13 17:06:33 Modified files: gfs2/edit : hexedit.h gfs2/fsck : initialize.c util.h gfs2/libgfs2 : buf.c libgfs2.h misc.c gfs2/mkfs : gfs2_mkfs.h gfs2/quota : check.c gfs2_quota.h main.c gfs2/tool : Makefile gfs2_tool.h main.c sb.c Removed files: gfs2/tool : util.c Log message: Resolves: bz 364741: GFS2: gfs2_quota doesn't work unless lock table specified Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/edit/hexedit.h.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.4.2.4r2=1.4.2.5 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/initialize.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.6.2.4r2=1.6.2.5 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/util.h.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.2r2=1.2.2.1 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/buf.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.3r2=1.3.2.1 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/libgfs2.h.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.7.2.14r2=1.7.2.15 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/misc.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.2.2.3r2=1.2.2.4 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mkfs/gfs2_mkfs.h.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.9r2=1.9.2.1 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/quota/check.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.2.2.4r2=1.2.2.5 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/quota/gfs2_quota.h.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.1.2.4r2=1.1.2.5 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/quota/main.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.2.2.6r2=1.2.2.7 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/Makefile.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.5.2.1r2=1.5.2.2 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/gfs2_tool.h.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.5.2.4r2=1.5.2.5 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/main.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.4.2.2r2=1.4.2.3 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/sb.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.2.2.1r2=1.2.2.2 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/util.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.5.2.3r2=NONE --- cluster/gfs2/edit/hexedit.h 2007/10/11 20:32:35 1.4.2.4 +++ cluster/gfs2/edit/hexedit.h 2007/11/13 17:06:32 1.4.2.5 @@ -178,31 +178,6 @@ #define SCREEN_HEIGHT (16) #define SCREEN_WIDTH(16) -/* I/O macros */ - -#define do_lseek(fd, off) \ -{ \ - if (lseek((fd), (off), SEEK_SET) != (off)) \ -die(bad seek: %s on line %d of file %s\n, \ - strerror(errno),__LINE__, __FILE__); \ -} - -#define do_read(fd, buff, len) \ -{ \ - if (read((fd), (buff), (len)) != (len)) \ -die(bad read: %s on line %d of file %s\n, \ - strerror(errno), __LINE__, __FILE__); \ -} - -#define do_write(fd, buff, len) \ -{ \ - if (write((fd), (buff), (len)) != (len)) \ -die(bad write: %s on line %d of file %s\n, \ - strerror(errno), __LINE__, __FILE__); \ -} - - - /* Memory macros */ #define type_zalloc(ptr, type, count) \ --- cluster/gfs2/fsck/initialize.c 2007/10/19 15:07:58 1.6.2.4 +++ cluster/gfs2/fsck/initialize.c 2007/11/13 17:06:32 1.6.2.5 @@ -169,7 +169,7 @@ last_data_block = rmax; first_data_block = rmin; - if(do_lseek(sdp-device_fd, (last_fs_block * sdp-sd_sb.sb_bsize))){ + if(fsck_lseek(sdp-device_fd, (last_fs_block * sdp-sd_sb.sb_bsize))){ log_crit(Can't seek to last block in file system: % PRIu64 (0x% PRIx64 )\n, last_fs_block, last_fs_block); goto fail; --- cluster/gfs2/fsck/util.h2006/06/06 14:49:31 1.2 +++ cluster/gfs2/fsck/util.h2007/11/13 17:06:32 1.2.2.1 @@ -16,16 +16,9 @@ #include libgfs2.h -#define do_lseek(fd, off) \ +#define fsck_lseek(fd, off) \ ((lseek((fd), (off), SEEK_SET) == (off)) ? 0 : -1) -#define do_read(fd, buff, len) \ - ((read((fd), (buff), (len)) == (len)) ? 0 : -1) - -#define do_write(fd, buff, len) \ - ((write((fd), (buff), (len)) == (len)) ? 0 : -1) - - int compute_height(struct gfs2_sbd *sdp, uint64_t sz); struct di_info *search_list(osi_list_t *list, uint64_t addr); void warm_fuzzy_stuff(uint64_t block); --- cluster/gfs2/libgfs2/buf.c 2006/06/08 21:02:15 1.3 +++ cluster/gfs2/libgfs2/buf.c 2007/11/13 17:06:32 1.3.2.1 @@ -25,27 +25,6 @@ #include libgfs2.h -#define do_lseek(sdp, off) \ -do { \ - if (lseek((sdp)-device_fd, (off), SEEK_SET) != (off)) \ - die(bad seek: %s on line %d of file %s\n, \ - strerror(errno), __LINE__, __FILE__); \ -} while (0) - -#define do_read(sdp, buf,
[Cluster-devel] cluster/gfs2/edit hexedit.c
CVSROOT:/cvs/cluster Module name:cluster Changes by: [EMAIL PROTECTED] 2007-11-08 18:10:09 Modified files: gfs2/edit : hexedit.c Log message: Printing the quota file wasn't printing its contents due to a bug. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/edit/hexedit.c.diff?cvsroot=clusterr1=1.23r2=1.24 --- cluster/gfs2/edit/hexedit.c 2007/11/07 15:07:07 1.23 +++ cluster/gfs2/edit/hexedit.c 2007/11/08 18:10:09 1.24 @@ -1247,8 +1247,6 @@ parse_rindex(tmp_inode, TRUE); brelse(tmp_bh, not_updated); } - else if (display_indirect(indirect, indirect_blocks, 0, 0) == 0) - return -1; else if (block_is_rglist()) { tmp_bh = bread(sbd, masterblock(rindex)); tmp_inode = inode_get(sbd, tmp_bh); @@ -1279,6 +1277,8 @@ print_quota(tmp_inode); brelse(tmp_bh, not_updated); } + else if (display_indirect(indirect, indirect_blocks, 0, 0) == 0) + return -1; return 0; }
[Cluster-devel] cluster/gfs2/tool gfs2_tool.h misc.c util.c
CVSROOT:/cvs/cluster Module name:cluster Branch: RHEL5 Changes by: [EMAIL PROTECTED] 2007-11-07 14:59:28 Modified files: gfs2/tool : gfs2_tool.h misc.c util.c Log message: Resolves: bz 352581: GFS2: implement gfs2_tool lockdump Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/gfs2_tool.h.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.5.2.3r2=1.5.2.4 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/misc.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.8.2.3r2=1.8.2.4 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/util.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.5.2.2r2=1.5.2.3 --- cluster/gfs2/tool/gfs2_tool.h 2007/10/30 14:08:33 1.5.2.3 +++ cluster/gfs2/tool/gfs2_tool.h 2007/11/07 14:59:28 1.5.2.4 @@ -95,7 +95,7 @@ char *get_list(void); char **str2lines(char *str); -const char *find_debugfs_mount(void); +char *find_debugfs_mount(void); char *mp2fsname(char *mp); char *name2value(char *str, char *name); uint32_t name2u32(char *str, char *name); --- cluster/gfs2/tool/misc.c2007/10/30 14:08:33 1.8.2.3 +++ cluster/gfs2/tool/misc.c2007/11/07 14:59:28 1.8.2.4 @@ -28,6 +28,7 @@ #define __user #include linux/gfs2_ondisk.h +#include sys/mount.h #include linux/fs.h #include libgfs2.h @@ -110,7 +111,67 @@ void print_lockdump(int argc, char **argv) { - die(lockdump not implemented: use debugfs instead. \ne.g. cat /sys/kernel/debug/gfs2/clustname\\:fsname/glocks\n); + char path[PATH_MAX]; + char *name, line[PATH_MAX]; + char *debugfs; + FILE *file; + int rc = -1, debug_dir_existed = 1; + + /* See if debugfs is mounted, and if not, mount it. */ + debugfs = find_debugfs_mount(); + if (!debugfs) { + debugfs = malloc(20); + if (!debugfs) + die(Can't allocate memory for debugfs.\n); + memset(debugfs, 0, 20); + strcpy(debugfs, /tmp/debugfs); + + if (access(debugfs, F_OK)) { + debug_dir_existed = mkdir(debugfs, 644); + if (debug_dir_existed) { + fprintf(stderr, + Can't create %s mount point.\n, + debugfs); + free(debugfs); + exit(-1); + } + } + rc = mount(none, debugfs, debugfs, 0, NULL); + if (rc) { + fprintf(stderr, + Can't mount debugfs. + Maybe your kernel doesn't support it.\n); + free(debugfs); + exit(-1); + } + } + name = mp2fsname(argv[optind]); + if (name) { + sprintf(path, %s/gfs2/%s/glocks, debugfs, name); + free(name); + file = fopen(path, rt); + if (file) { + while (fgets(line, PATH_MAX, file)) { + printf(line); + } + fclose(file); + } else { + fprintf(stderr, Can't open %s: %s\n, path, + strerror(errno)); + } + } else { + fprintf(stderr, Unable to locate sysfs for mount point %s.\n, + argv[optind]); + } + /* Check if we mounted the debugfs and if so, unmount it. */ + if (!rc) { + umount(debugfs); + /* Check if we created the debugfs mount point and if so, + delete it. */ + if (!debug_dir_existed) + rmdir(debugfs); + } + free(debugfs); } /** --- cluster/gfs2/tool/util.c2007/11/06 20:23:59 1.5.2.2 +++ cluster/gfs2/tool/util.c2007/11/07 14:59:28 1.5.2.3 @@ -283,6 +283,36 @@ return name; } +char * +find_debugfs_mount(void) +{ + FILE *file; + char line[PATH_MAX]; + char device[PATH_MAX], type[PATH_MAX]; + char *path; + + file = fopen(/proc/mounts, rt); + if (!file) + die(can't open /proc/mounts: %s\n, strerror(errno)); + + path = malloc(PATH_MAX); + if (!path) + die(Can't allocate memory for debugfs.\n); + while (fgets(line, PATH_MAX, file)) { + + if (sscanf(line, %s %s %s, device, path, type) != 3) + continue; + if (!strcmp(type, debugfs)) { + fclose(file); + return path; + } + } + + free(path); + fclose(file); + return NULL; +} + /* The fsname can be substituted for the mountpoint on the command line. This is necessary when we can't resolve a devname from
[Cluster-devel] cluster/gfs2/edit hexedit.c
CVSROOT:/cvs/cluster Module name:cluster Changes by: [EMAIL PROTECTED] 2007-11-07 15:07:08 Modified files: gfs2/edit : hexedit.c Log message: Fix a divide by zero if the target isn't a gfs or gfs2 file system. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/edit/hexedit.c.diff?cvsroot=clusterr1=1.22r2=1.23 --- cluster/gfs2/edit/hexedit.c 2007/10/18 19:56:41 1.22 +++ cluster/gfs2/edit/hexedit.c 2007/11/07 15:07:07 1.23 @@ -1322,7 +1322,9 @@ else gfs1 = FALSE; bufsize = sbd.sd_sb.sb_bsize; - block = 0x10 * (4096 / bufsize); + if (!bufsize) + bufsize = GFS2_DEFAULT_BSIZE; + block = 0x10 * (GFS2_DEFAULT_BSIZE / bufsize); } /* */
[Cluster-devel] cluster/gfs2/man gfs2_tool.8
CVSROOT:/cvs/cluster Module name:cluster Branch: RHEL5 Changes by: [EMAIL PROTECTED] 2007-11-07 21:15:13 Modified files: gfs2/man : gfs2_tool.8 Log message: Resolves: bz 336561: gfs2_tool accepts jdata flag; man page says no Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/man/gfs2_tool.8.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.3.2.2r2=1.3.2.3 --- cluster/gfs2/man/gfs2_tool.82007/10/30 14:08:33 1.3.2.2 +++ cluster/gfs2/man/gfs2_tool.82007/11/07 21:15:13 1.3.2.3 @@ -103,11 +103,17 @@ Print out the superblock. .TP \fBsetflag\fP \fIFlag\fR \fIFile1\fR \fIFile2\fR \fI...\fR -Set an attribute flag on a file. There are five currently -supported flags. They are directio, immutable, appendonly, +Set an attribute flag on a file. There are six currently +supported flags. They are jdata, directio, immutable, appendonly, noatime, and sync. In most cases, the chattr command may be used rather than gfs2_tool to set attributes. +The \fIjdata\fR flag causes all the data written to a file +to be journaled. If the \fIjdata\fR flag is set for a directory, +all files and directories subsequently created within that directory +are also journaled. This behavior replaces the old \fIinherit_jdata\fR +flag from gfs. Same as chattr +j. + The \fIdirectio\fR flag causes all I/O to a regular file to be Direct I/O, even if the O_DIRECT flag isn't used on the open() command. @@ -123,10 +129,6 @@ The \fIsync\fR flag causes data written to the file to be sync'ed to stable storage immediately. Same as chattr +S. - -Note: Unlike the original gfs_tool, the journaled data (\fIjdata\fR) flag -is set with chattr +j and reset with chattr -j. Likewise, the -\fIinherit_jdata\fR flag is set on a directory with chattr +j. .TP \fBsettune\fP \fIMountPoint\fR \fIparameter\fR \fInewvalue\fR Set the value of tuning parameter. Use \fBgettune\fP for a listing of
[Cluster-devel] cluster/gfs2/tool gfs2_tool.h misc.c util.c
CVSROOT:/cvs/cluster Module name:cluster Changes by: [EMAIL PROTECTED] 2007-11-07 14:58:00 Modified files: gfs2/tool : gfs2_tool.h misc.c util.c Log message: Resolves: bz 352581: GFS2: implement gfs2_tool lockdump Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/gfs2_tool.h.diff?cvsroot=clusterr1=1.8r2=1.9 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/misc.c.diff?cvsroot=clusterr1=1.11r2=1.12 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/util.c.diff?cvsroot=clusterr1=1.7r2=1.8 --- cluster/gfs2/tool/gfs2_tool.h 2007/10/30 14:06:06 1.8 +++ cluster/gfs2/tool/gfs2_tool.h 2007/11/07 14:57:59 1.9 @@ -95,7 +95,7 @@ char *get_list(void); char **str2lines(char *str); -const char *find_debugfs_mount(void); +char *find_debugfs_mount(void); char *mp2fsname(char *mp); char *name2value(char *str, char *name); uint32_t name2u32(char *str, char *name); --- cluster/gfs2/tool/misc.c2007/10/30 14:06:06 1.11 +++ cluster/gfs2/tool/misc.c2007/11/07 14:57:59 1.12 @@ -28,6 +28,7 @@ #define __user #include linux/gfs2_ondisk.h +#include sys/mount.h #include linux/fs.h #include libgfs2.h @@ -110,7 +111,67 @@ void print_lockdump(int argc, char **argv) { - die(lockdump not implemented: use debugfs instead. \ne.g. cat /sys/kernel/debug/gfs2/clustname\\:fsname/glocks\n); + char path[PATH_MAX]; + char *name, line[PATH_MAX]; + char *debugfs; + FILE *file; + int rc = -1, debug_dir_existed = 1; + + /* See if debugfs is mounted, and if not, mount it. */ + debugfs = find_debugfs_mount(); + if (!debugfs) { + debugfs = malloc(20); + if (!debugfs) + die(Can't allocate memory for debugfs.\n); + memset(debugfs, 0, 20); + strcpy(debugfs, /tmp/debugfs); + + if (access(debugfs, F_OK)) { + debug_dir_existed = mkdir(debugfs, 644); + if (debug_dir_existed) { + fprintf(stderr, + Can't create %s mount point.\n, + debugfs); + free(debugfs); + exit(-1); + } + } + rc = mount(none, debugfs, debugfs, 0, NULL); + if (rc) { + fprintf(stderr, + Can't mount debugfs. + Maybe your kernel doesn't support it.\n); + free(debugfs); + exit(-1); + } + } + name = mp2fsname(argv[optind]); + if (name) { + sprintf(path, %s/gfs2/%s/glocks, debugfs, name); + free(name); + file = fopen(path, rt); + if (file) { + while (fgets(line, PATH_MAX, file)) { + printf(line); + } + fclose(file); + } else { + fprintf(stderr, Can't open %s: %s\n, path, + strerror(errno)); + } + } else { + fprintf(stderr, Unable to locate sysfs for mount point %s.\n, + argv[optind]); + } + /* Check if we mounted the debugfs and if so, unmount it. */ + if (!rc) { + umount(debugfs); + /* Check if we created the debugfs mount point and if so, + delete it. */ + if (!debug_dir_existed) + rmdir(debugfs); + } + free(debugfs); } /** --- cluster/gfs2/tool/util.c2007/11/06 20:22:55 1.7 +++ cluster/gfs2/tool/util.c2007/11/07 14:57:59 1.8 @@ -283,6 +283,36 @@ return name; } +char * +find_debugfs_mount(void) +{ + FILE *file; + char line[PATH_MAX]; + char device[PATH_MAX], type[PATH_MAX]; + char *path; + + file = fopen(/proc/mounts, rt); + if (!file) + die(can't open /proc/mounts: %s\n, strerror(errno)); + + path = malloc(PATH_MAX); + if (!path) + die(Can't allocate memory for debugfs.\n); + while (fgets(line, PATH_MAX, file)) { + + if (sscanf(line, %s %s %s, device, path, type) != 3) + continue; + if (!strcmp(type, debugfs)) { + fclose(file); + return path; + } + } + + free(path); + fclose(file); + return NULL; +} + /* The fsname can be substituted for the mountpoint on the command line. This is necessary when we can't resolve a devname from /proc/mounts to a fsname. */
[Cluster-devel] cluster/gfs2/man gfs2_tool.8
CVSROOT:/cvs/cluster Module name:cluster Changes by: [EMAIL PROTECTED] 2007-11-07 21:14:50 Modified files: gfs2/man : gfs2_tool.8 Log message: Resolves: bz 336561: gfs2_tool accepts jdata flag; man page says no Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/man/gfs2_tool.8.diff?cvsroot=clusterr1=1.5r2=1.6 --- cluster/gfs2/man/gfs2_tool.82007/10/30 14:06:06 1.5 +++ cluster/gfs2/man/gfs2_tool.82007/11/07 21:14:50 1.6 @@ -103,11 +103,17 @@ Print out the superblock. .TP \fBsetflag\fP \fIFlag\fR \fIFile1\fR \fIFile2\fR \fI...\fR -Set an attribute flag on a file. There are five currently -supported flags. They are directio, immutable, appendonly, +Set an attribute flag on a file. There are six currently +supported flags. They are jdata, directio, immutable, appendonly, noatime, and sync. In most cases, the chattr command may be used rather than gfs2_tool to set attributes. +The \fIjdata\fR flag causes all the data written to a file +to be journaled. If the \fIjdata\fR flag is set for a directory, +all files and directories subsequently created within that directory +are also journaled. This behavior replaces the old \fIinherit_jdata\fR +flag from gfs. Same as chattr +j. + The \fIdirectio\fR flag causes all I/O to a regular file to be Direct I/O, even if the O_DIRECT flag isn't used on the open() command. @@ -123,10 +129,6 @@ The \fIsync\fR flag causes data written to the file to be sync'ed to stable storage immediately. Same as chattr +S. - -Note: Unlike the original gfs_tool, the journaled data (\fIjdata\fR) flag -is set with chattr +j and reset with chattr -j. Likewise, the -\fIinherit_jdata\fR flag is set on a directory with chattr +j. .TP \fBsettune\fP \fIMountPoint\fR \fIparameter\fR \fInewvalue\fR Set the value of tuning parameter. Use \fBgettune\fP for a listing of
[Cluster-devel] cluster/gfs2/tool util.c
CVSROOT:/cvs/cluster Module name:cluster Branch: RHEL5 Changes by: [EMAIL PROTECTED] 2007-11-06 20:23:59 Modified files: gfs2/tool : util.c Log message: Resolves: bz 354201: GFS2: gfs2_tool: unknown mountpoint on some mount points Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/util.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.5.2.1r2=1.5.2.2 --- cluster/gfs2/tool/util.c2007/10/25 14:14:47 1.5.2.1 +++ cluster/gfs2/tool/util.c2007/11/06 20:23:59 1.5.2.2 @@ -27,6 +27,7 @@ #include libgen.h #include dirent.h #include string.h +#include linux/kdev_t.h #define __user #include linux/gfs2_ondisk.h @@ -282,42 +283,6 @@ return name; } -/* Iterate through gfs2 dirs looking for one where the id - attribute matches devname and return the associated fsname: - /sys/kernel/gfs2/fsname/fsname - /sys/kernel/gfs2/fsname/id - - The id attribute is the superblock id (s_id) from the kernel. - It often matches the device node the fs was mounted from (as - displayed in /proc/mounts), but not always. -*/ - -char * -devname2fsname(char *devname) -{ - char *fsname = NULL; - DIR *d; - struct dirent *de; - - d = opendir(SYS_BASE); - if (!d) - die(can't open %s: %s\n, SYS_BASE, strerror(errno)); - - while ((de = readdir(d))) { - if (de-d_name[0] == '.') - continue; - - if (strcmp(get_sysfs(de-d_name, id), devname) == 0) { - fsname = strdup(de-d_name); - break; - } - } - - closedir(d); - - return fsname; -} - /* The fsname can be substituted for the mountpoint on the command line. This is necessary when we can't resolve a devname from /proc/mounts to a fsname. */ @@ -349,7 +314,20 @@ /** * mp2fsname - Find the name for a filesystem given its mountpoint - * @mp: + * + * We do this by iterating through gfs2 dirs in /sys/fs/gfs2/ looking for + * one where the id attribute matches the device id returned by stat for + * the mount point. The reason we go through all this is simple: the + * kernel's sysfs is named after the VFS s_id, not the device name. + * So it's perfectly legal to do something like this to simulate user + * conditions without the proper hardware: + *# rm /dev/sdb1 + *# mkdir /dev/cciss + *# mknod /dev/cciss/c0d0p1 b 8 17 + *# mount -tgfs2 /dev/cciss/c0d0p1 /mnt/gfs2 + *# gfs2_tool gettune /mnt/gfs2 + * In this example the tuning variables are in a directory named after the + * VFS s_id, which in this case would be /sys/fs/gfs2/sdb1/ * * Returns: the fsname */ @@ -357,22 +335,35 @@ char * mp2fsname(char *mp) { - char *devname = NULL, *fsname = NULL; + char device_id[PATH_MAX], *fsname = NULL; + struct stat statbuf; + DIR *d; + struct dirent *de; - devname = mp2devname(mp); + if (stat(mp, statbuf)) + return NULL; + + memset(device_id, 0, sizeof(device_id)); + sprintf(device_id, %u:%u, (uint32_t)MAJOR(statbuf.st_dev), + (uint32_t)MINOR(statbuf.st_dev)); + + d = opendir(SYS_BASE); + if (!d) + die(can't open %s: %s\n, SYS_BASE, strerror(errno)); - if (devname) { - fsname = devname2fsname(devname); - if (fsname) - return fsname; - die(unknown mountpoint %s, no fsname for %s\n, mp, devname); - } else { - if (is_fsname(mp)) - return mp; - die(unknown mountpoint %s, no device found\n, mp); + while ((de = readdir(d))) { + if (de-d_name[0] == '.') + continue; + + if (strcmp(get_sysfs(de-d_name, id), device_id) == 0) { + fsname = strdup(de-d_name); + break; + } } - return NULL; + closedir(d); + + return fsname; } /**
[Cluster-devel] cluster/gfs2 man/gfs2_tool.8 tool/gfs2_tool.h ...
CVSROOT:/cvs/cluster Module name:cluster Changes by: [EMAIL PROTECTED] 2007-10-30 14:06:06 Modified files: gfs2/man : gfs2_tool.8 gfs2/tool : gfs2_tool.h main.c misc.c Log message: Resolves: bz 349601: GFS2 requires straightforward way to determine number of journals Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/man/gfs2_tool.8.diff?cvsroot=clusterr1=1.4r2=1.5 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/gfs2_tool.h.diff?cvsroot=clusterr1=1.7r2=1.8 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/main.c.diff?cvsroot=clusterr1=1.6r2=1.7 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/misc.c.diff?cvsroot=clusterr1=1.10r2=1.11 --- cluster/gfs2/man/gfs2_tool.82007/07/26 23:19:31 1.4 +++ cluster/gfs2/man/gfs2_tool.82007/10/30 14:06:06 1.5 @@ -41,6 +41,9 @@ \fBgettune\fP \fIMountPoint\fR Print out the current values of the tuning parameters in a running filesystem. +.TP +\fBjournals\fP \fIMountPoint\fR +Print out information about the journals in a mounted filesystem. .\.TP .\\fBjindex\fP \fIMountPoint\fR .\Print out the journal index of a mounted filesystem. --- cluster/gfs2/tool/gfs2_tool.h 2007/10/25 14:14:33 1.7 +++ cluster/gfs2/tool/gfs2_tool.h 2007/10/30 14:06:06 1.8 @@ -72,6 +72,7 @@ void print_sb(int argc, char **argv); void print_args(int argc, char **argv); void print_jindex(int argc, char **argv); +void print_journals(int argc, char **argv); void print_rindex(int argc, char **argv); void print_quota(int argc, char **argv); void print_list(void); --- cluster/gfs2/tool/main.c2007/10/11 20:27:49 1.6 +++ cluster/gfs2/tool/main.c2007/10/30 14:06:06 1.7 @@ -53,6 +53,9 @@ Get tuneable parameters for a filesystem\n, gfs2_tool gettune mountpoint\n, \n, + List the file system's journals:\n, + gfs2_tool journals mountpoint\n, + \n, List filesystems:\n, gfs2_tool list\n, \n, @@ -235,6 +238,8 @@ print_args(argc, argv); else if (strcmp(action, gettune) == 0) get_tune(argc, argv); + else if (strcmp(action, journals) == 0) + print_journals(argc, argv); else if (strcmp(action, list) == 0) print_list(); else if (strcmp(action, lockdump) == 0) --- cluster/gfs2/tool/misc.c2007/10/25 14:27:33 1.10 +++ cluster/gfs2/tool/misc.c2007/10/30 14:06:06 1.11 @@ -358,6 +358,71 @@ } +/** + * print_journals - print out the file system journal information + * @argc: + * @argv: + * + */ + +void +print_journals(int argc, char **argv) +{ + struct gfs2_sbd sbd; + DIR *jindex; + struct dirent *journal; + char jindex_name[PATH_MAX], jname[PATH_MAX]; + int jcount; + struct stat statbuf; + + memset(sbd, 0, sizeof(struct gfs2_sbd)); + sbd.bsize = GFS2_DEFAULT_BSIZE; + sbd.rgsize = -1; + sbd.jsize = GFS2_DEFAULT_JSIZE; + sbd.qcsize = GFS2_DEFAULT_QCSIZE; + sbd.md.journals = 1; + + sbd.path_name = argv[optind]; + sbd.path_fd = open(sbd.path_name, O_RDONLY); + if (sbd.path_fd 0) + die(can't open root directory %s: %s\n, + sbd.path_name, strerror(errno)); + check_for_gfs2(sbd); + sbd.device_fd = open(sbd.device_name, O_RDONLY); + if (sbd.device_fd 0) + die(can't open device %s: %s\n, + sbd.device_name, strerror(errno)); + if (!find_gfs2_meta(sbd)) + mount_gfs2_meta(sbd); + lock_for_admin(sbd); + + sprintf(jindex_name, %s/jindex, sbd.metafs_path); + jindex = opendir(jindex_name); + if (!jindex) { + die(Can't open %s\n, jindex_name); + } else { + jcount = 0; + while ((journal = readdir(jindex))) { + if (journal-d_name[0] == '.') + continue; + sprintf(jname, %s/%s, jindex_name, journal-d_name); + if (stat(jname, statbuf)) { + statbuf.st_size = 0; + perror(jname); + } + jcount++; + printf(%s - %lluMB\n, journal-d_name, + (unsigned long long)statbuf.st_size / 1048576); + } + + printf(%d journal(s) found.\n, jcount); + closedir(jindex); + } + cleanup_metafs(sbd); + close(sbd.device_fd); + close(sbd.path_fd); +} + #if GFS2_TOOL_FEATURE_IMPLEMENTED /** * print_jindex - print out the journal index
[Cluster-devel] cluster/gfs2 man/gfs2_tool.8 tool/gfs2_tool.h ...
CVSROOT:/cvs/cluster Module name:cluster Branch: RHEL5 Changes by: [EMAIL PROTECTED] 2007-10-30 14:08:33 Modified files: gfs2/man : gfs2_tool.8 gfs2/tool : gfs2_tool.h main.c misc.c Log message: Resolves: bz 349601: GFS2 requires straightforward way to determine number of journals Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/man/gfs2_tool.8.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.3.2.1r2=1.3.2.2 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/gfs2_tool.h.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.5.2.2r2=1.5.2.3 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/main.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.4.2.1r2=1.4.2.2 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/misc.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.8.2.2r2=1.8.2.3 --- cluster/gfs2/man/gfs2_tool.82007/07/26 23:20:59 1.3.2.1 +++ cluster/gfs2/man/gfs2_tool.82007/10/30 14:08:33 1.3.2.2 @@ -41,6 +41,9 @@ \fBgettune\fP \fIMountPoint\fR Print out the current values of the tuning parameters in a running filesystem. +.TP +\fBjournals\fP \fIMountPoint\fR +Print out information about the journals in a mounted filesystem. .\.TP .\\fBjindex\fP \fIMountPoint\fR .\Print out the journal index of a mounted filesystem. --- cluster/gfs2/tool/gfs2_tool.h 2007/10/25 14:14:47 1.5.2.2 +++ cluster/gfs2/tool/gfs2_tool.h 2007/10/30 14:08:33 1.5.2.3 @@ -72,6 +72,7 @@ void print_sb(int argc, char **argv); void print_args(int argc, char **argv); void print_jindex(int argc, char **argv); +void print_journals(int argc, char **argv); void print_rindex(int argc, char **argv); void print_quota(int argc, char **argv); void print_list(void); --- cluster/gfs2/tool/main.c2007/10/11 20:32:37 1.4.2.1 +++ cluster/gfs2/tool/main.c2007/10/30 14:08:33 1.4.2.2 @@ -53,6 +53,9 @@ Get tuneable parameters for a filesystem\n, gfs2_tool gettune mountpoint\n, \n, + List the file system's journals:\n, + gfs2_tool journals mountpoint\n, + \n, List filesystems:\n, gfs2_tool list\n, \n, @@ -235,6 +238,8 @@ print_args(argc, argv); else if (strcmp(action, gettune) == 0) get_tune(argc, argv); + else if (strcmp(action, journals) == 0) + print_journals(argc, argv); else if (strcmp(action, list) == 0) print_list(); else if (strcmp(action, lockdump) == 0) --- cluster/gfs2/tool/misc.c2007/10/25 14:27:54 1.8.2.2 +++ cluster/gfs2/tool/misc.c2007/10/30 14:08:33 1.8.2.3 @@ -358,6 +358,71 @@ } +/** + * print_journals - print out the file system journal information + * @argc: + * @argv: + * + */ + +void +print_journals(int argc, char **argv) +{ + struct gfs2_sbd sbd; + DIR *jindex; + struct dirent *journal; + char jindex_name[PATH_MAX], jname[PATH_MAX]; + int jcount; + struct stat statbuf; + + memset(sbd, 0, sizeof(struct gfs2_sbd)); + sbd.bsize = GFS2_DEFAULT_BSIZE; + sbd.rgsize = -1; + sbd.jsize = GFS2_DEFAULT_JSIZE; + sbd.qcsize = GFS2_DEFAULT_QCSIZE; + sbd.md.journals = 1; + + sbd.path_name = argv[optind]; + sbd.path_fd = open(sbd.path_name, O_RDONLY); + if (sbd.path_fd 0) + die(can't open root directory %s: %s\n, + sbd.path_name, strerror(errno)); + check_for_gfs2(sbd); + sbd.device_fd = open(sbd.device_name, O_RDONLY); + if (sbd.device_fd 0) + die(can't open device %s: %s\n, + sbd.device_name, strerror(errno)); + if (!find_gfs2_meta(sbd)) + mount_gfs2_meta(sbd); + lock_for_admin(sbd); + + sprintf(jindex_name, %s/jindex, sbd.metafs_path); + jindex = opendir(jindex_name); + if (!jindex) { + die(Can't open %s\n, jindex_name); + } else { + jcount = 0; + while ((journal = readdir(jindex))) { + if (journal-d_name[0] == '.') + continue; + sprintf(jname, %s/%s, jindex_name, journal-d_name); + if (stat(jname, statbuf)) { + statbuf.st_size = 0; + perror(jname); + } + jcount++; + printf(%s - %lluMB\n, journal-d_name, + (unsigned long long)statbuf.st_size / 1048576); + } + + printf(%d journal(s) found.\n, jcount); + closedir(jindex); + } + cleanup_metafs(sbd); + close(sbd.device_fd); + close(sbd.path_fd); +} + #if GFS2_TOOL_FEATURE_IMPLEMENTED /** * print_jindex - print out the journal index
[Cluster-devel] cluster/gfs2 libgfs2/misc.c tool/Makefile tool ...
CVSROOT:/cvs/cluster Module name:cluster Changes by: [EMAIL PROTECTED] 2007-10-25 14:14:33 Modified files: gfs2/libgfs2 : misc.c gfs2/tool : Makefile counters.c df.c gfs2_tool.h layout.c misc.c tune.c util.c Log message: Resolves: bz 345501: GFS2: gfs2 utils uses non-canonicalized names Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/misc.c.diff?cvsroot=clusterr1=1.4r2=1.5 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/Makefile.diff?cvsroot=clusterr1=1.13r2=1.14 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/counters.c.diff?cvsroot=clusterr1=1.3r2=1.4 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/df.c.diff?cvsroot=clusterr1=1.7r2=1.8 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/gfs2_tool.h.diff?cvsroot=clusterr1=1.6r2=1.7 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/layout.c.diff?cvsroot=clusterr1=1.3r2=1.4 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/misc.c.diff?cvsroot=clusterr1=1.8r2=1.9 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/tune.c.diff?cvsroot=clusterr1=1.3r2=1.4 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/util.c.diff?cvsroot=clusterr1=1.5r2=1.6 --- cluster/gfs2/libgfs2/misc.c 2007/06/26 01:43:17 1.4 +++ cluster/gfs2/libgfs2/misc.c 2007/10/25 14:14:32 1.5 @@ -170,16 +170,18 @@ check_for_gfs2(struct gfs2_sbd *sdp) { FILE *fp = fopen(/proc/mounts, r); - char *name = sdp-path_name; char buffer[PATH_MAX]; char fstype[80]; int fsdump, fspass, ret; char fspath[PATH_MAX]; char fsoptions[PATH_MAX]; + char *realname; - if (name[strlen(name) - 1] == '/') - name[strlen(name) - 1] = '\0'; - + realname = realpath(sdp-path_name, NULL); + if (!realname) { + perror(sdp-path_name); + return; + } if (fp == NULL) { perror(open: /proc/mounts); exit(EXIT_FAILURE); @@ -199,19 +201,21 @@ continue; /* Check if they specified the device instead of mnt point */ - if (strcmp(sdp-device_name, name) == 0) + if (strcmp(sdp-device_name, realname) == 0) strcpy(sdp-path_name, fspath); /* fix it */ - else if (strcmp(fspath, name) != 0) + else if (strcmp(fspath, realname) != 0) continue; fclose(fp); if (strncmp(sdp-device_name, /dev/loop, 9) == 0) die(Cannot perform this operation on a loopback GFS2 mount.\n); + free(realname); return; } + free(realname); fclose(fp); - die(gfs2 Filesystem %s is not mounted.\n, name); + die(gfs2 Filesystem %s is not mounted.\n, sdp-path_name); } void --- cluster/gfs2/tool/Makefile 2007/08/28 04:35:44 1.13 +++ cluster/gfs2/tool/Makefile 2007/10/25 14:14:33 1.14 @@ -27,7 +27,7 @@ CFLAGS += -D_FILE_OFFSET_BITS=64 CFLAGS += -I${KERNEL_SRC}/fs/gfs2/ -I${KERNEL_SRC}/include/ -CFLAGS += -I../include +CFLAGS += -I../include -I../libgfs2/ CFLAGS += -I${incdir} LDFLAGS += -L../libgfs2 -lgfs2 --- cluster/gfs2/tool/counters.c2006/05/05 18:06:09 1.3 +++ cluster/gfs2/tool/counters.c2007/10/25 14:14:33 1.4 @@ -28,6 +28,7 @@ #include osi_list.h #include gfs2_tool.h +#include libgfs2.h #define SIZE (65536) @@ -132,24 +133,19 @@ print_counters(int argc, char **argv) { unsigned int i = interval; - char *path, *fs; - int fd; + char *fs; + struct gfs2_sbd sbd; interval = 1; if (optind argc) - path = argv[optind++]; + sbd.path_name = argv[optind++]; else die(Usage: gfs2_tool counters mountpoint\n); - fd = open(path, O_RDONLY); - if (fd 0) - die(can't open file %s: %s\n, path, strerror(errno)); + check_for_gfs2(sbd); - check_for_gfs2(fd, path); - close(fd); - - fs = mp2fsname(path); + fs = mp2fsname(sbd.path_name); for (;;) { print_line(fs, glock_count, locks, 0); @@ -204,6 +200,4 @@ first = FALSE; } } - - close(fd); } --- cluster/gfs2/tool/df.c 2006/05/05 18:06:09 1.7 +++ cluster/gfs2/tool/df.c 2007/10/25 14:14:33 1.8 @@ -29,6 +29,7 @@ #include linux/gfs2_ondisk.h #include gfs2_tool.h +#include libgfs2.h #define SIZE (65536) @@ -42,7 +43,6 @@ static void do_df_one(char *path) { - int fd; struct gfs2_ioctl gi; /* char stat_gfs2[SIZE]; */ /* unsigned int percentage; */ @@ -53,14 +53,15 @@ unsigned int flags; char *fs, *value; int error; + struct gfs2_sbd sbd; +
[Cluster-devel] cluster/gfs2 libgfs2/misc.c tool/Makefile tool ...
CVSROOT:/cvs/cluster Module name:cluster Branch: RHEL5 Changes by: [EMAIL PROTECTED] 2007-10-25 14:14:47 Modified files: gfs2/libgfs2 : misc.c gfs2/tool : Makefile counters.c df.c gfs2_tool.h layout.c misc.c tune.c util.c Log message: Resolves: bz 345501: GFS2: gfs2 utils uses non-canonicalized names Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/misc.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.2.2.2r2=1.2.2.3 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/Makefile.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.5r2=1.5.2.1 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/counters.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.3r2=1.3.2.1 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/df.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.7r2=1.7.2.1 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/gfs2_tool.h.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.5.2.1r2=1.5.2.2 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/layout.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.3r2=1.3.2.1 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/misc.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.8r2=1.8.2.1 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/tune.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.3r2=1.3.2.1 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/util.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.5r2=1.5.2.1 --- cluster/gfs2/libgfs2/misc.c 2007/06/26 01:51:44 1.2.2.2 +++ cluster/gfs2/libgfs2/misc.c 2007/10/25 14:14:47 1.2.2.3 @@ -170,16 +170,18 @@ check_for_gfs2(struct gfs2_sbd *sdp) { FILE *fp = fopen(/proc/mounts, r); - char *name = sdp-path_name; char buffer[PATH_MAX]; char fstype[80]; int fsdump, fspass, ret; char fspath[PATH_MAX]; char fsoptions[PATH_MAX]; + char *realname; - if (name[strlen(name) - 1] == '/') - name[strlen(name) - 1] = '\0'; - + realname = realpath(sdp-path_name, NULL); + if (!realname) { + perror(sdp-path_name); + return; + } if (fp == NULL) { perror(open: /proc/mounts); exit(EXIT_FAILURE); @@ -199,19 +201,21 @@ continue; /* Check if they specified the device instead of mnt point */ - if (strcmp(sdp-device_name, name) == 0) + if (strcmp(sdp-device_name, realname) == 0) strcpy(sdp-path_name, fspath); /* fix it */ - else if (strcmp(fspath, name) != 0) + else if (strcmp(fspath, realname) != 0) continue; fclose(fp); if (strncmp(sdp-device_name, /dev/loop, 9) == 0) die(Cannot perform this operation on a loopback GFS2 mount.\n); + free(realname); return; } + free(realname); fclose(fp); - die(gfs2 Filesystem %s is not mounted.\n, name); + die(gfs2 Filesystem %s is not mounted.\n, sdp-path_name); } void --- cluster/gfs2/tool/Makefile 2006/08/11 15:18:13 1.5 +++ cluster/gfs2/tool/Makefile 2007/10/25 14:14:47 1.5.2.1 @@ -14,7 +14,7 @@ include ${top_srcdir}/make/defines.mk -INCLUDE= -I${top_srcdir}/include -I${top_srcdir}/config -I${gfs2kincdir} +INCLUDE= -I${top_srcdir}/include -I${top_srcdir}/config -I${gfs2kincdir} -I../libgfs2/ ifneq (${KERNEL_SRC}, ) # Use the kernel tree if patched, otherwise, look where cluster headers --- cluster/gfs2/tool/counters.c2006/05/05 18:06:09 1.3 +++ cluster/gfs2/tool/counters.c2007/10/25 14:14:47 1.3.2.1 @@ -28,6 +28,7 @@ #include osi_list.h #include gfs2_tool.h +#include libgfs2.h #define SIZE (65536) @@ -132,24 +133,19 @@ print_counters(int argc, char **argv) { unsigned int i = interval; - char *path, *fs; - int fd; + char *fs; + struct gfs2_sbd sbd; interval = 1; if (optind argc) - path = argv[optind++]; + sbd.path_name = argv[optind++]; else die(Usage: gfs2_tool counters mountpoint\n); - fd = open(path, O_RDONLY); - if (fd 0) - die(can't open file %s: %s\n, path, strerror(errno)); + check_for_gfs2(sbd); - check_for_gfs2(fd, path); - close(fd); - - fs = mp2fsname(path); + fs = mp2fsname(sbd.path_name); for (;;) { print_line(fs, glock_count, locks, 0); @@ -204,6 +200,4 @@ first = FALSE; } } - - close(fd); } --- cluster/gfs2/tool/df.c 2006/05/05 18:06:09 1.7 +++ cluster/gfs2/tool/df.c 2007/10/25 14:14:47 1.7.2.1 @@ -29,6 +29,7 @@ #include linux/gfs2_ondisk.h #include gfs2_tool.h +#include libgfs2.h
[Cluster-devel] cluster/gfs2/tool misc.c
CVSROOT:/cvs/cluster Module name:cluster Changes by: [EMAIL PROTECTED] 2007-10-25 14:27:33 Modified files: gfs2/tool : misc.c Log message: Resolves: bz 345501: minor correction to previous commit. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/misc.c.diff?cvsroot=clusterr1=1.9r2=1.10 --- cluster/gfs2/tool/misc.c2007/10/25 14:14:33 1.9 +++ cluster/gfs2/tool/misc.c2007/10/25 14:27:33 1.10 @@ -110,7 +110,7 @@ void print_lockdump(int argc, char **argv) { - die(lockdump not implemented: use debugfs instead. \ne.g. cat /sys/kernel/debug/gfs2/clustname\:fsname/glocks\n); + die(lockdump not implemented: use debugfs instead. \ne.g. cat /sys/kernel/debug/gfs2/clustname\\:fsname/glocks\n); } /**
[Cluster-devel] cluster/gfs/gfs_grow main.c
CVSROOT:/cvs/cluster Module name:cluster Branch: RHEL5 Changes by: [EMAIL PROTECTED] 2007-10-25 20:02:51 Modified files: gfs/gfs_grow : main.c Log message: Resolves: bz 337961: gfs_grow /mountpoint/ does not work Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs/gfs_grow/main.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.5.2.1r2=1.5.2.2 --- cluster/gfs/gfs_grow/main.c 2007/01/17 19:08:25 1.5.2.1 +++ cluster/gfs/gfs_grow/main.c 2007/10/25 20:02:51 1.5.2.2 @@ -729,33 +729,42 @@ */ static int -find_fs(char *name) +find_fs(const char *name) { FILE *fp = fopen(/proc/mounts, r); char buffer[4096]; char fstype[80]; int fsdump, fspass; + char *realname; + realname = realpath(name, NULL); + if (!realname) { + perror(name); + return -1; + } if (fp == NULL) { perror(open: /proc/mounts); exit(EXIT_FAILURE); } while ((fgets(buffer, 4095, fp)) != NULL) { buffer[4095] = 0; - if (strstr(buffer, name) == 0) + if (strstr(buffer, realname) == 0) continue; if (sscanf(buffer, %s %s %s %s %d %d, device, fspath, fstype, fsoptions, fsdump, fspass) != 6) continue; if (strcmp(fstype, gfs) != 0) continue; - if ((strcmp(device, name) != 0) (strcmp(fspath, name) != 0)) + if ((strcmp(device, realname) != 0) + (strcmp(fspath, realname) != 0)) continue; fclose(fp); + free(realname); return 0; } fprintf(stderr, GFS Filesystem %s not found\n, name); fclose(fp); + free(realname); return 1; }
[Cluster-devel] cluster/gfs2/man gfs2_jadd.8
CVSROOT:/cvs/cluster Module name:cluster Changes by: [EMAIL PROTECTED] 2007-10-24 21:19:12 Modified files: gfs2/man : gfs2_jadd.8 Log message: Resolves: bz #334481: gfs2_jadd man page refers to non-existent -T option Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/man/gfs2_jadd.8.diff?cvsroot=clusterr1=1.1r2=1.2 --- cluster/gfs2/man/gfs2_jadd.82005/05/24 22:16:15 1.1 +++ cluster/gfs2/man/gfs2_jadd.82007/10/24 21:19:12 1.2 @@ -30,9 +30,6 @@ mounted filesystem and so failure part way through the expansion process should leave your filesystem in its original state. -You can run \fIgfs2_jadd\fR with the \fI-T\fR flag to get a display -of the current state of a mounted GFS2 filesystem. - .SH OPTIONS .TP \fB-c MegaBytes\fP @@ -56,11 +53,6 @@ \fB-q\fP Be quiet. Don't print anything. .TP -\fB-T\fP -Test. Do all calculations, but do not write any data to the disk and do -not add journals. This is used to discover what the tool would -have done were it run without this flag. -.TP \fB-u MegaBytes\fP Initial size of each journal's unlinked tag file .TP
[Cluster-devel] cluster/gfs2/man gfs2_jadd.8
CVSROOT:/cvs/cluster Module name:cluster Branch: RHEL5 Changes by: [EMAIL PROTECTED] 2007-10-24 21:19:48 Modified files: gfs2/man : gfs2_jadd.8 Log message: Resolves: bug #334481: gfs2_jadd man page refers to non-existent -T option Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/man/gfs2_jadd.8.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.1r2=1.1.2.1 --- cluster/gfs2/man/gfs2_jadd.82005/05/24 22:16:15 1.1 +++ cluster/gfs2/man/gfs2_jadd.82007/10/24 21:19:48 1.1.2.1 @@ -30,9 +30,6 @@ mounted filesystem and so failure part way through the expansion process should leave your filesystem in its original state. -You can run \fIgfs2_jadd\fR with the \fI-T\fR flag to get a display -of the current state of a mounted GFS2 filesystem. - .SH OPTIONS .TP \fB-c MegaBytes\fP @@ -56,11 +53,6 @@ \fB-q\fP Be quiet. Don't print anything. .TP -\fB-T\fP -Test. Do all calculations, but do not write any data to the disk and do -not add journals. This is used to discover what the tool would -have done were it run without this flag. -.TP \fB-u MegaBytes\fP Initial size of each journal's unlinked tag file .TP
[Cluster-devel] cluster/gfs2 fsck/fs_recovery.c fsck/fs_recove ...
CVSROOT:/cvs/cluster Module name:cluster Changes by: [EMAIL PROTECTED] 2007-10-19 15:06:56 Modified files: gfs2/fsck : fs_recovery.c fs_recovery.h initialize.c gfs2/libgfs2 : Makefile libgfs2.h Added files: gfs2/libgfs2 : recovery.c Log message: Resolves: bz 291551: gfs2_fsck clears journals without asking. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/fs_recovery.c.diff?cvsroot=clusterr1=1.5r2=1.6 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/fs_recovery.h.diff?cvsroot=clusterr1=1.2r2=1.3 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/initialize.c.diff?cvsroot=clusterr1=1.9r2=1.10 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/recovery.c.diff?cvsroot=clusterr1=NONEr2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/Makefile.diff?cvsroot=clusterr1=1.11r2=1.12 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/libgfs2.h.diff?cvsroot=clusterr1=1.20r2=1.21 --- cluster/gfs2/fsck/fs_recovery.c 2007/02/12 19:28:49 1.5 +++ cluster/gfs2/fsck/fs_recovery.c 2007/10/19 15:06:56 1.6 @@ -11,6 +11,7 @@ *** **/ +#include errno.h #include inttypes.h #include linux_endian.h #include stdlib.h @@ -18,36 +19,421 @@ #include time.h #include unistd.h +#include fsck.h +#include fs_recovery.h #include libgfs2.h #include util.h -#include fs_recovery.h #define RANDOM(values) ((values) * (random() / (RAND_MAX + 1.0))) +unsigned int sd_found_jblocks = 0, sd_replayed_jblocks = 0; +unsigned int sd_found_metablocks = 0, sd_replayed_metablocks = 0; +unsigned int sd_found_revokes = 0; +osi_list_t sd_revoke_list; +unsigned int sd_replay_tail; + +struct gfs2_revoke_replay { + osi_list_t rr_list; + uint64_t rr_blkno; + unsigned int rr_where; +}; + +int gfs2_revoke_add(struct gfs2_sbd *sdp, uint64_t blkno, unsigned int where) +{ + osi_list_t *tmp, *head = sd_revoke_list; + struct gfs2_revoke_replay *rr; + int found = 0; + + osi_list_foreach(tmp, head) { + rr = osi_list_entry(tmp, struct gfs2_revoke_replay, rr_list); + if (rr-rr_blkno == blkno) { + found = 1; + break; + } + } + + if (found) { + rr-rr_where = where; + return 0; + } + + rr = malloc(sizeof(struct gfs2_revoke_replay)); + if (!rr) + return -ENOMEM; + + rr-rr_blkno = blkno; + rr-rr_where = where; + osi_list_add(rr-rr_list, head); + return 1; +} + +int gfs2_revoke_check(struct gfs2_sbd *sdp, uint64_t blkno, unsigned int where) +{ + osi_list_t *tmp; + struct gfs2_revoke_replay *rr; + int wrap, a, b, revoke; + int found = 0; + + osi_list_foreach(tmp, sd_revoke_list) { + rr = osi_list_entry(tmp, struct gfs2_revoke_replay, rr_list); + if (rr-rr_blkno == blkno) { + found = 1; + break; + } + } + + if (!found) + return 0; + + wrap = (rr-rr_where sd_replay_tail); + a = (sd_replay_tail where); + b = (where rr-rr_where); + revoke = (wrap) ? (a || b) : (a b); + return revoke; +} + +void gfs2_revoke_clean(struct gfs2_sbd *sdp) +{ + osi_list_t *head = sd_revoke_list; + struct gfs2_revoke_replay *rr; + + while (!osi_list_empty(head)) { + rr = osi_list_entry(head-next, struct gfs2_revoke_replay, rr_list); + osi_list_del(rr-rr_list); + free(rr); + } +} + +static int buf_lo_scan_elements(struct gfs2_inode *ip, unsigned int start, + struct gfs2_log_descriptor *ld, __be64 *ptr, + int pass) +{ + struct gfs2_sbd *sdp = ip-i_sbd; + unsigned int blks = be32_to_cpu(ld-ld_data1); + struct gfs2_buffer_head *bh_log, *bh_ip; + uint64_t blkno; + int error = 0; + enum update_flags if_modified; + + if (pass != 1 || be32_to_cpu(ld-ld_type) != GFS2_LOG_DESC_METADATA) + return 0; + + gfs2_replay_incr_blk(ip, start); + + for (; blks; gfs2_replay_incr_blk(ip, start), blks--) { + uint32_t check_magic; + + sd_found_metablocks++; + + blkno = be64_to_cpu(*ptr++); + if (gfs2_revoke_check(sdp, blkno, start)) + continue; + + error = gfs2_replay_read_block(ip, start, bh_log); + if (error) + return error; + + bh_ip = bget(sdp, blkno); + memcpy(bh_ip-b_data, bh_log-b_data, bh_log-b_size); + + check_magic = ((struct gfs2_meta_header *) +
[Cluster-devel] cluster/gfs2/edit hexedit.c hexedit.h savemeta.c
CVSROOT:/cvs/cluster Module name:cluster Changes by: [EMAIL PROTECTED] 2007-10-18 19:56:41 Modified files: gfs2/edit : hexedit.c hexedit.h savemeta.c Log message: While working on bz #291551, I discovered that gfs2_edit savemeta only saved true metadata, but we need more than that. There are lots of blocks that are considered data (not metadata) by the RG bitmaps that we still need to save. These include: 1. All the system journals (which may contain both metadata and user data, disguised as data blocks within the journal). We need to pick out the parts that do not contain user data. 2. The system files, such as statfs, inum, quota file, etc. These may be helpful in debugging user problems. 3. Indirect block pointers, which may be counted as data for accounting purposes, even though it's metadata. 4. Directory leaf blocks. This change allows gfs2_edit to save and restore these blocks properly, and also to print out a breakdown of a saved metadata file: gfs2_edit printsavedmeta /tmp/gfsmeta It also improves on the information given when a journal is dumped. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/edit/hexedit.c.diff?cvsroot=clusterr1=1.21r2=1.22 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/edit/hexedit.h.diff?cvsroot=clusterr1=1.11r2=1.12 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/edit/savemeta.c.diff?cvsroot=clusterr1=1.3r2=1.4 --- cluster/gfs2/edit/hexedit.c 2007/10/12 21:38:18 1.21 +++ cluster/gfs2/edit/hexedit.c 2007/10/18 19:56:41 1.22 @@ -47,8 +47,9 @@ int display(int identify_only); extern void eol(int col); extern int do_indirect_extended(char *buf, struct iinfo *ii); -extern void savemeta(const char *in_fn, const char *out_fn, int slow); -extern void restoremeta(const char *in_fn, const char *out_device); +extern void savemeta(const char *out_fn, int slow); +extern void restoremeta(const char *in_fn, const char *out_device, + int printblocksonly); /* */ /* UpdateSize - screen size changed, so update it */ @@ -350,7 +351,7 @@ /* returns: metatype if block is a GFS2 structure block type*/ /* 0 if block is not a GFS2 structure */ /* */ -int display_block_type(const char *lpBuffer) +int display_block_type(const char *lpBuffer, int from_restore) { int ret_type = 0; /* return type */ @@ -375,12 +376,14 @@ } else print_gfs2( ); - print_gfs2(of % PRIu64 (0x% PRIX64 ), max_block, max_block); - if (termlines) - move(line, 55); - else - printf( ); - + if (!from_restore) { + print_gfs2(of % PRIu64 (0x% PRIX64 ), max_block, + max_block); + if (termlines) + move(line, 55); + else + printf( ); + } if (block == RGLIST_DUMMY_BLOCK) { ret_type = GFS2_METATYPE_RG; struct_len = sizeof(struct gfs2_rgrp); @@ -447,6 +450,8 @@ else struct_len = 512; eol(0); + if (from_restore) + return ret_type; if (termlines dmode == HEX_MODE) { /* calculate how much of the buffer we can fit on screen */ screen_chunk_size = ((termlines - 4) * 16) 8 8; @@ -616,7 +621,7 @@ block = masterblock(rindex); ribh = bread(sbd, block); riinode = inode_get(sbd, ribh); - printf(%d RGs in this file system.\n, + printf(%lld RGs in this file system.\n, riinode-i_di.di_size / sizeof(struct gfs2_rindex)); inode_put(riinode, not_updated); exit(EXIT_SUCCESS); @@ -661,7 +666,7 @@ ribh = bread(sbd, block); riinode = inode_get(sbd, ribh); if (rgnum = riinode-i_di.di_size / sizeof(struct gfs2_rindex)) { - fprintf(stderr, Error: File system only has %d RGs.\n, + fprintf(stderr, Error: File system only has %lld RGs.\n, riinode-i_di.di_size / sizeof(struct gfs2_rindex)); inode_put(riinode, not_updated); brelse(ribh, not_updated); @@ -671,8 +676,9 @@ bh = bread(sbd, rgblk); gfs2_rgrp_in(rg, bh-b_data); if (modify) { - printf(RG #%d (block %lld / 0x%llx) rg_flags changed from 0x%08x to 0x%08x\n, - rgnum, rgblk, rgblk, rg.rg_flags, new_flags); + printf(RG #%d (block %llu / 0x%llx) rg_flags changed from 0x%08x to 0x%08x\n, + rgnum, (unsigned long long)rgblk, +
[Cluster-devel] cluster/gfs2 edit/hexedit.c man/gfs2_edit.8
CVSROOT:/cvs/cluster Module name:cluster Changes by: [EMAIL PROTECTED] 2007-10-12 21:38:18 Modified files: gfs2/edit : hexedit.c gfs2/man : gfs2_edit.8 Log message: Resolves: 235931: gfs2_edit command to set NOALLOC flag Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/edit/hexedit.c.diff?cvsroot=clusterr1=1.20r2=1.21 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/man/gfs2_edit.8.diff?cvsroot=clusterr1=1.2r2=1.3 --- cluster/gfs2/edit/hexedit.c 2007/10/12 15:37:19 1.20 +++ cluster/gfs2/edit/hexedit.c 2007/10/12 21:38:18 1.21 @@ -602,6 +602,98 @@ } /* */ +/* rgcount - return how many rgrps there are. */ +/* */ +void rgcount(void) +{ + uint64_t block; + struct gfs2_buffer_head *ribh; + struct gfs2_inode *riinode; + + if (gfs1) + block = sbd1-sb_rindex_di.no_addr; + else + block = masterblock(rindex); + ribh = bread(sbd, block); + riinode = inode_get(sbd, ribh); + printf(%d RGs in this file system.\n, + riinode-i_di.di_size / sizeof(struct gfs2_rindex)); + inode_put(riinode, not_updated); + exit(EXIT_SUCCESS); +} + +/* */ +/* find_rgrp_block - locate the block for a given rgrp number */ +/* */ +uint64_t find_rgrp_block(struct gfs2_inode *di, int rg) +{ + char buf[sizeof(struct gfs2_rindex)]; + int amt; + struct gfs2_rindex ri; + + amt = gfs2_readi(di, (void *)buf, +rg * sizeof(struct gfs2_rindex), +sizeof(struct gfs2_rindex)); + if (!amt) /* end of file */ + return 0; + gfs2_rindex_in(ri, buf); + return ri.ri_addr; +} + +/* */ +/* set_rgrp_flags - Set an rgrp's flags to a given value*/ +/* rgnum: which rg to print or modify flags for (0 - X) */ +/* new_flags: value to set new rg_flags to (if modify == TRUE) */ +/* modify: TRUE if the value is to be modified, FALSE if it's to be printed */ +/* full: TRUE if the full RG should be printed. */ +/* */ +void set_rgrp_flags(int rgnum, uint32_t new_flags, int modify, int full) +{ + struct gfs2_rgrp rg; + struct gfs2_buffer_head *bh, *ribh; + uint64_t rgblk, block; + struct gfs2_inode *riinode; + + if (gfs1) + block = sbd1-sb_rindex_di.no_addr; + else + block = masterblock(rindex); + ribh = bread(sbd, block); + riinode = inode_get(sbd, ribh); + if (rgnum = riinode-i_di.di_size / sizeof(struct gfs2_rindex)) { + fprintf(stderr, Error: File system only has %d RGs.\n, + riinode-i_di.di_size / sizeof(struct gfs2_rindex)); + inode_put(riinode, not_updated); + brelse(ribh, not_updated); + return; + } + rgblk = find_rgrp_block(riinode, rgnum); + bh = bread(sbd, rgblk); + gfs2_rgrp_in(rg, bh-b_data); + if (modify) { + printf(RG #%d (block %lld / 0x%llx) rg_flags changed from 0x%08x to 0x%08x\n, + rgnum, rgblk, rgblk, rg.rg_flags, new_flags); + rg.rg_flags = new_flags; + gfs2_rgrp_out(rg, bh-b_data); + brelse(bh, updated); + } else { + if (full) { + print_gfs2(RG #%d, rgnum); + print_gfs2( located at: %llu (0x%llx), rgblk, rgblk); +eol(0); + gfs2_rgrp_print(rg); + } + else + printf(RG #%d (block %lld / 0x%llx) rg_flags = 0x%08x\n, + rgnum, rgblk, rgblk, rg.rg_flags); + brelse(bh, not_updated); + } + inode_put(riinode, not_updated); + if (modify) + bsync(sbd); +} + +/* */ /* parse_rindex - print the rgindex file. */ /* */ int parse_rindex(struct gfs2_inode *di, int print_rindex) @@ -622,9 +714,9 @@ error = gfs2_readi(di, (void *)buf, print_entry_ndx * sizeof(struct gfs2_rindex), sizeof(struct gfs2_rindex)); - gfs2_rindex_in(ri, buf); if (!error)
[Cluster-devel] cluster/gfs2/libgfs2 gfs2_log.c
CVSROOT:/cvs/cluster Module name:cluster Changes by: [EMAIL PROTECTED] 2007-10-11 16:34:28 Modified files: gfs2/libgfs2 : gfs2_log.c Log message: Resolves: bz 240545 (addendum). Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/gfs2_log.c.diff?cvsroot=clusterr1=1.4r2=1.5 --- cluster/gfs2/libgfs2/gfs2_log.c 2007/08/15 22:28:18 1.4 +++ cluster/gfs2/libgfs2/gfs2_log.c 2007/10/11 16:34:28 1.5 @@ -165,10 +165,6 @@ int ret = 0; *setonabort = 0; - va_start(args, format); - - transform = _(format); - if(opts-yes) return 1; if(opts-no) @@ -176,7 +172,10 @@ opts-query = TRUE; while (1) { + va_start(args, format); + transform = _(format); vprintf(transform, args); + va_end(args); /* Make sure query is printed out */ fflush(NULL);
[Cluster-devel] cluster/gfs2/libgfs2 gfs2_log.c
CVSROOT:/cvs/cluster Module name:cluster Branch: RHEL5 Changes by: [EMAIL PROTECTED] 2007-10-11 16:35:24 Modified files: gfs2/libgfs2 : gfs2_log.c Log message: Resolves: bz 240545 (addendum). Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/gfs2_log.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.2.2.2r2=1.2.2.3 --- cluster/gfs2/libgfs2/gfs2_log.c 2007/08/15 22:31:00 1.2.2.2 +++ cluster/gfs2/libgfs2/gfs2_log.c 2007/10/11 16:35:23 1.2.2.3 @@ -165,10 +165,6 @@ int ret = 0; *setonabort = 0; - va_start(args, format); - - transform = _(format); - if(opts-yes) return 1; if(opts-no) @@ -176,7 +172,10 @@ opts-query = TRUE; while (1) { + va_start(args, format); + transform = _(format); vprintf(transform, args); + va_end(args); /* Make sure query is printed out */ fflush(NULL);
[Cluster-devel] cluster/gfs/man gfs_edit.8
CVSROOT:/cvs/cluster Module name:cluster Changes by: [EMAIL PROTECTED] 2007-10-11 16:47:29 Added files: gfs/man: gfs_edit.8 Log message: Resolves: bz 295301: Need man page for gfs_edit Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs/man/gfs_edit.8.diff?cvsroot=clusterr1=NONEr2=1.1 /cvs/cluster/cluster/gfs/man/gfs_edit.8,v -- standard output revision 1.1 --- cluster/gfs/man/gfs_edit.8 +++ - 2007-10-11 16:47:30.11288 + @@ -0,0 +1,130 @@ +.\ Copyright (C) 2007 Red Hat, Inc. All rights reserved. + +.TH gfs_edit 8 + +.SH NAME +gfs_edit - Display or edit GFS internal structures. + +.SH SYNOPSIS +.B gfs_edit +[\fIOPTION\fR]... \fIDEVICE\fR + +.SH DESCRIPTION +The gfs_edit command is a tool used to examine, edit or display internal +data structures of a GFS filesystem. Use at your own risk. + +.SH OPTIONS +.TP +\fB-V\fP +Print program version information only. + +.SH INTERACTIVE MODE +There are three display modes: hex mode, structure mode and pointers mode. +You use the m key to switch between the modes, as described below. +The modes are as follows: +.TP +Hex mode (default) +Display or edit blocks of the file system in hexadecimal and ascii. + +Lines at the top indicate the currently displayed block number in hex. +If the block contains a GFS data structure, the name of that +structure will appear in the upper right corner of the display. +If the block is a well-known block, such as the superblock or rindex, +there will be a line to indicate what it is. + +In hex mode, you can edit blocks by pressing \fBenter\fP and entering +hexadecimal digits to replace the highlighted hex digits. Do NOT precede +the numbers with 0x. For example, if you want to change the value at +offset 0x60 from a 0x12 to 0xef, position your cursor to offset 0x60, +so that the 12 is highlighted, then press \fBenter\fP and type in ef. +You will automatically be returned to display mode (Unlike gfs2_edit, +you may only edit one byte at a time.) + +In hex mode, different colors indicate different things. +For example, an inode will appear white, block offsets will be light +blue, and actual data (anything after the gfs data structure) will be red. + +.TP +Structure mode +Decode the file system block into its GFS structure and +display the values of that structure. This mode is most useful for +jumping around the file system. For example, you can use the arrow +keys to position down to a pointer and press \fBJ\fP to jump to that block. + +.TP +Pointers mode +Display any additional information appearing on the block. +For example, if an inode has block pointers, this will display them and +allow you to scroll through them. You can also position to one of them +and press \fBJ\fP to jump to that block. + +.SH Interactive mode command keys: +.TP +\fBq\fP or \fBesc\fP +The \fBq\fP or \fBescape\fP keys are used to exit gfs_edit. + +.TP +\fBarrow/movement keys\fP up, down, right, left, pg-up, pg-down, home, end +The arrow keys are used to highlight an area of the display. The \fBJ\fP +key may be used to jump to the block that is highlighted. + +.TP +\fBm\fP - Mode switch +The \fBm\fP key is used to switch between the three display modes. +The initial mode is hex mode. Pressing the \fBm\fP key once switches to +structure mode. Pressing it a second time switches from structure mode +to pointers mode. Pressing it a third time takes you back to hex mode again. + +.TP +\fBj\fP - Jump to block +The \fBj\fP key jumps to the block number that is currently highlighted. +In hex mode, hitting J will work when any byte of the pointer is highlighted. + +.TP +\fBg\fP - Goto block +The \fBg\fP key asks for a block number, then jumps there. Note that +in many cases, you can also arrow up so that the current block number +is highlighted, then press \fBenter\fP to enter a block number to jump to +in hexadecimal, with no leading 0x. + +.TP +\fBh\fP - Help display +The \fBh\fP key causes the interactive help display to be shown. + +.TP +\fBf\fP or \fBspace\fP - Forward block +The \fBf\fP key causes you to scroll forward one block. + +.TP +\fBb\fP - Backward block +The \fBb\fP key causes you to scroll backward one block. + +.TP +\fBhome\fP - Return to superblock +The \fBhome\fP key takes you back to the superblock. + +.TP +\fBbackspace\fP +This takes you back to the block you were displaying previously. +Unlike gfs2_edit, gfs_edit only remembers the one block you previously viewed. + +.SH EXAMPLES +.TP +gfs_edit /dev/vg0/lvol0 +This will display the superblock of the gfs file system located on +/dev/vg0/lvol0 and allow you to edit. + +.SH KNOWN LIMITATIONS +.TP +Shortcomings compared to gfs2_edit +Unlike gfs2_edit, gfs_edit cannot print data structures. There is no +alternate color scheme. It does not remember multiple block jumps, +and it can not parse the rindex file and other data structures. +It only operates on file systems with the default 4K block size. +It does not work
[Cluster-devel] cluster/gfs2 edit/hexedit.h edit/savemeta.c fs ...
CVSROOT:/cvs/cluster Module name:cluster Branch: RHEL5 Changes by: [EMAIL PROTECTED] 2007-10-11 20:32:37 Modified files: gfs2/edit : hexedit.h savemeta.c gfs2/fsck : lost_n_found.c pass1.c pass1b.c gfs2/include : gfs_ondisk.h gfs2/libgfs2 : fs_ops.c ondisk.c super.c gfs2/quota : main.c gfs2/tool : main.c Log message: Resolves: bz 251180: Build time warnings for gfs2 userland tools Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/edit/hexedit.h.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.4.2.3r2=1.4.2.4 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/edit/savemeta.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.1.2.1r2=1.1.2.2 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/lost_n_found.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.3r2=1.3.2.1 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/pass1.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.4.2.6r2=1.4.2.7 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/pass1b.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.3.2.3r2=1.3.2.4 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/include/gfs_ondisk.h.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.1r2=1.1.2.1 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/fs_ops.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.4.2.8r2=1.4.2.9 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/ondisk.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.5.2.2r2=1.5.2.3 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/super.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.3.2.2r2=1.3.2.3 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/quota/main.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.2.2.5r2=1.2.2.6 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/main.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.4r2=1.4.2.1 --- cluster/gfs2/edit/hexedit.h 2007/06/26 01:40:43 1.4.2.3 +++ cluster/gfs2/edit/hexedit.h 2007/10/11 20:32:35 1.4.2.4 @@ -223,7 +223,6 @@ __LINE__, __FILE__); \ } -#define pa(struct, member, count) print_array(#member, struct-member, count); #define printk printw /* Divide x by y. Round up if there is a remainder. */ --- cluster/gfs2/edit/savemeta.c2007/06/26 01:53:19 1.1.2.1 +++ cluster/gfs2/edit/savemeta.c2007/10/11 20:32:35 1.1.2.2 @@ -282,7 +282,7 @@ int error; struct gfs2_rindex buf; struct rgrp_list *rgd, *prev_rgd; - uint64_t prev_length; + uint64_t prev_length = 0; *count1 = 0; prev_rgd = NULL; --- cluster/gfs2/fsck/lost_n_found.c2006/06/12 20:41:43 1.3 +++ cluster/gfs2/fsck/lost_n_found.c2007/10/11 20:32:36 1.3.2.1 @@ -15,7 +15,6 @@ #include stdio.h #include stdlib.h #include string.h -#include sys/types.h #include sys/stat.h #include unistd.h #include dirent.h @@ -94,35 +93,35 @@ dir_add(ip, filename, filename_len, (lf_dip-i_di.di_num), DT_DIR); free(filename); - sprintf(tmp_name, lost_dir_%PRIu64, ip-i_di.di_num.no_addr); + sprintf(tmp_name, lost_dir_%llu, ip-i_di.di_num.no_addr); inode_type = DT_DIR; break; case S_IFREG: - sprintf(tmp_name, lost_file_%PRIu64, ip-i_di.di_num.no_addr); + sprintf(tmp_name, lost_file_%llu, ip-i_di.di_num.no_addr); inode_type = DT_REG; break; case S_IFLNK: - sprintf(tmp_name, lost_link_%PRIu64, ip-i_di.di_num.no_addr); + sprintf(tmp_name, lost_link_%llu, ip-i_di.di_num.no_addr); inode_type = DT_LNK; break; case S_IFBLK: - sprintf(tmp_name, lost_blkdev_%PRIu64, ip-i_di.di_num.no_addr); + sprintf(tmp_name, lost_blkdev_%llu, ip-i_di.di_num.no_addr); inode_type = DT_BLK; break; case S_IFCHR: - sprintf(tmp_name, lost_chrdev_%PRIu64, ip-i_di.di_num.no_addr); + sprintf(tmp_name, lost_chrdev_%llu, ip-i_di.di_num.no_addr); inode_type = DT_CHR; break; case S_IFIFO: - sprintf(tmp_name, lost_fifo_%PRIu64, ip-i_di.di_num.no_addr); + sprintf(tmp_name, lost_fifo_%llu, ip-i_di.di_num.no_addr); inode_type = DT_FIFO; break; case S_IFSOCK: - sprintf(tmp_name, lost_socket_%PRIu64, ip-i_di.di_num.no_addr); + sprintf(tmp_name, lost_socket_%llu, ip-i_di.di_num.no_addr); inode_type = DT_SOCK; break; default: - sprintf(tmp_name, lost_%PRIu64, ip-i_di.di_num.no_addr); + sprintf(tmp_name, lost_%llu, ip-i_di.di_num.no_addr); inode_type = DT_REG; break; } --- cluster/gfs2/fsck/pass1.c 2007/08/15 22:31:00
[Cluster-devel] cluster/gfs2/man Makefile
CVSROOT:/cvs/cluster Module name:cluster Branch: RHEL5 Changes by: [EMAIL PROTECTED] 2007-10-08 21:39:34 Modified files: gfs2/man : Makefile Log message: Resolves: bz 247318 - Need man page for gfs2_edit Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/man/Makefile.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.2r2=1.2.2.1 --- cluster/gfs2/man/Makefile 2006/06/28 14:12:02 1.2 +++ cluster/gfs2/man/Makefile 2007/10/08 21:39:34 1.2.2.1 @@ -14,6 +14,7 @@ TARGET8= \ gfs2.8 \ gfs2_convert.8 \ + gfs2_edit.8 \ gfs2_fsck.8 \ gfs2_grow.8 \ gfs2_jadd.8 \
[Cluster-devel] cluster/gfs2/man Makefile gfs2_edit.8
CVSROOT:/cvs/cluster Module name:cluster Changes by: [EMAIL PROTECTED] 2007-10-08 21:40:32 Modified files: gfs2/man : Makefile gfs2_edit.8 Log message: Resolves: bz 247318: Need man page for gfs2_edit Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/man/Makefile.diff?cvsroot=clusterr1=1.3r2=1.4 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/man/gfs2_edit.8.diff?cvsroot=clusterr1=1.1r2=1.2 --- cluster/gfs2/man/Makefile 2007/04/30 11:22:16 1.3 +++ cluster/gfs2/man/Makefile 2007/10/08 21:40:32 1.4 @@ -16,6 +16,7 @@ TARGET8= \ gfs2.8 \ gfs2_convert.8 \ + gfs2_edit.8 \ gfs2_fsck.8 \ gfs2_grow.8 \ gfs2_jadd.8 \ --- cluster/gfs2/man/gfs2_edit.82007/09/18 18:46:00 1.1 +++ cluster/gfs2/man/gfs2_edit.82007/10/08 21:40:32 1.2 @@ -128,7 +128,7 @@ The modes are as follows: .TP Hex mode (default) -Display or edits blocks of the file system in hexadecimal and ascii. +Display or edit blocks of the file system in hexadecimal and ascii. Lines at the top indicate the currently displayed block in both hex and decimal. If the block contains a GFS2 data structure, the name of that
[Cluster-devel] cluster/gfs2/libgfs2 fs_ops.c
CVSROOT:/cvs/cluster Module name:cluster Changes by: [EMAIL PROTECTED] 2007-09-24 23:16:34 Modified files: gfs2/libgfs2 : fs_ops.c Log message: Resolves: bz 304001: GFS2: Filesystems with 1k block size won't mount Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/fs_ops.c.diff?cvsroot=clusterr1=1.11r2=1.12 --- cluster/gfs2/libgfs2/fs_ops.c 2007/09/17 17:08:20 1.11 +++ cluster/gfs2/libgfs2/fs_ops.c 2007/09/24 23:16:34 1.12 @@ -585,7 +585,7 @@ } struct gfs2_buffer_head *get_file_buf(struct gfs2_inode *ip, uint64_t lbn, - int prealloc) + int prealloc) { struct gfs2_sbd *sdp = ip-i_sbd; uint64_t dbn; @@ -594,7 +594,7 @@ if (inode_is_stuffed(ip)) unstuff_dinode(ip); - block_map(ip, lbn, new, dbn, NULL, prealloc, not_updated); + block_map(ip, lbn, new, dbn, NULL, prealloc, updated); if (!dbn) die(get_file_buf\n);
[Cluster-devel] cluster/gfs2/libgfs2 fs_ops.c
CVSROOT:/cvs/cluster Module name:cluster Branch: RHEL5 Changes by: [EMAIL PROTECTED] 2007-09-24 23:17:41 Modified files: gfs2/libgfs2 : fs_ops.c Log message: Resolves: bz 304001: GFS2: Filesystems with 1k block size won't mount Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/fs_ops.c.diff?cvsroot=clusteronly_with_tag=RHEL5r1=1.4.2.7r2=1.4.2.8 --- cluster/gfs2/libgfs2/fs_ops.c 2007/09/17 17:23:40 1.4.2.7 +++ cluster/gfs2/libgfs2/fs_ops.c 2007/09/24 23:17:41 1.4.2.8 @@ -585,7 +585,7 @@ } struct gfs2_buffer_head *get_file_buf(struct gfs2_inode *ip, uint64_t lbn, - int prealloc) + int prealloc) { struct gfs2_sbd *sdp = ip-i_sbd; uint64_t dbn; @@ -594,7 +594,7 @@ if (inode_is_stuffed(ip)) unstuff_dinode(ip); - block_map(ip, lbn, new, dbn, NULL, prealloc, not_updated); + block_map(ip, lbn, new, dbn, NULL, prealloc, updated); if (!dbn) die(get_file_buf\n);
[Cluster-devel] cluster/gfs2/fsck Makefile
CVSROOT:/cvs/cluster Module name:cluster Branch: RHEL51 Changes by: [EMAIL PROTECTED] 2007-09-11 18:31:25 Modified files: gfs2/fsck : Makefile Log message: Resolves: bz 286211: gfs2_fsck not found by fsck wrapper. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/Makefile.diff?cvsroot=clusteronly_with_tag=RHEL51r1=1.6.2.2r2=1.6.2.2.2.1 --- cluster/gfs2/fsck/Makefile 2007/05/01 18:20:49 1.6.2.2 +++ cluster/gfs2/fsck/Makefile 2007/09/11 18:31:25 1.6.2.2.2.1 @@ -14,7 +14,8 @@ include ${top_srcdir}/make/defines.mk -TARGET= gfs2_fsck +TARGET1= fsck.gfs2 +TARGET2= gfs2_fsck INCLUDES= -I${top_srcdir}/include -I${top_srcdir}/config -I${top_srcdir}/libgfs2 -I${KERNEL_SRC}/fs/gfs2/ -I${KERNEL_SRC}/include/ LIBS=${top_srcdir}/libgfs2 @@ -27,38 +28,43 @@ CFLAGS+=-D_FILE_OFFSET_BITS=64 -DHELPER_PROGRAM -DGFS_RELEASE_NAME=\${RELEASE}\ -Wall -O2 -all: ${TARGET} +all: depends ${TARGET1} ${TARGET2} -gfs2_fsck: $(sources:.c=.o) $(LIBS)/libgfs2.a +${TARGET1}: $(sources:.c=.o) $(CC) $(CFLAGS) -L$(LIBS) $^ -o $@ -lgfs2 +${TARGET2}: ${TARGET1} + ln -f ${TARGET1} ${TARGET2} + %.o: %.c $(CC) -MMD -c $(INCLUDES) $(CFLAGS) $ -o $@ +depends: + $(MAKE) -C ../libgfs2 all test_block_list: log.o test_block_list.o $(CC) $(CFLAGS) $^ -o $@ test_bitmap: test_bitmap.o log.o $(CC) $(CFLAGS) $^ -o $@ + clean: - @rm -f gfs2_fsck *.o *~ *.d + rm -f ${TARGET1} ${TARGET2} *.o *~ *.d cscope.* test_inode_list *.orig *.rej test_block_list test_bitmap install: all if [ ! -d ${sbindir} ]; then \ install -d ${sbindir}; \ fi - strip ${TARGET} - install -m755 ${TARGET} ${sbindir} + install -m755 ${TARGET1} ${sbindir} + ln -f ${sbindir}/${TARGET1} ${sbindir}/${TARGET2} distclean: clean - @rm -f cscope.* gfs2_fsck test_inode_list *.orig *.rej test_block_list test_bitmap + @rm -f cscope.* {TARGET1} test_inode_list *.orig *.rej test_block_list test_bitmap -gfs2_fsck.pot: $(sources) +{TARGET1}.pot: $(sources) @xgettext -C -F --keyword=print_log --keyword=log_debug --keyword=log_info --keyword=_ \ --keyword=log_notice --keyword=log_warn --keyword=log_err --keyword=log_crit \ ---keyword=log_debug --keyword=log_err --keyword=log_print -d - $(sources) gfs2_fsck.pot - +--keyword=log_debug --keyword=log_err --keyword=log_print -d - $(sources) ${TARGET1}.pot -include $(sources:.c=.d)