* [Cluster-devel] cluster/gfs2 fsck/main.c fsck/metawalk.c fsck/ ...
@ 2007-09-17 17:08 rpeterso
0 siblings, 0 replies; 3+ messages in thread
From: rpeterso @ 2007-09-17 17:08 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: rpeterso at sourceware.org 2007-09-17 17:08:21
Modified files:
gfs2/fsck : main.c metawalk.c pass2.c
gfs2/libgfs2 : fs_ops.c libgfs2.h
Log message:
Resolves: bz 291451: gfs2_fsck -n, Bad file descriptor on line 63 of
file buf.c
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/main.c.diff?cvsroot=cluster&r1=1.9&r2=1.10
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/metawalk.c.diff?cvsroot=cluster&r1=1.11&r2=1.12
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/pass2.c.diff?cvsroot=cluster&r1=1.7&r2=1.8
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/fs_ops.c.diff?cvsroot=cluster&r1=1.10&r2=1.11
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/libgfs2.h.diff?cvsroot=cluster&r1=1.18&r2=1.19
--- cluster/gfs2/fsck/main.c 2007/08/22 08:58:46 1.9
+++ cluster/gfs2/fsck/main.c 2007/09/17 17:08:20 1.10
@@ -283,6 +283,7 @@
struct gfs2_sbd sb;
struct gfs2_sbd *sbp = &sb;
int j;
+ enum update_flags update_sys_files;
memset(sbp, 0, sizeof(*sbp));
@@ -387,22 +388,24 @@
else
log_notice("Pass5 complete \n");
}
+ update_sys_files = (opts.no ? not_updated : updated);
/* Free up our system inodes */
- inode_put(sbp->md.inum, updated);
- inode_put(sbp->md.statfs, updated);
+ inode_put(sbp->md.inum, update_sys_files);
+ inode_put(sbp->md.statfs, update_sys_files);
for (j = 0; j < sbp->md.journals; j++)
- inode_put(sbp->md.journal[j], updated);
- inode_put(sbp->md.jiinode, updated);
- inode_put(sbp->md.riinode, updated);
- inode_put(sbp->md.qinode, updated);
- inode_put(sbp->md.pinode, updated);
- inode_put(sbp->md.rooti, updated);
- inode_put(sbp->master_dir, updated);
+ inode_put(sbp->md.journal[j], update_sys_files);
+ inode_put(sbp->md.jiinode, update_sys_files);
+ inode_put(sbp->md.riinode, update_sys_files);
+ inode_put(sbp->md.qinode, update_sys_files);
+ inode_put(sbp->md.pinode, update_sys_files);
+ inode_put(sbp->md.rooti, update_sys_files);
+ inode_put(sbp->master_dir, update_sys_files);
if (lf_dip)
- inode_put(lf_dip, updated);
+ inode_put(lf_dip, update_sys_files);
/* print_map(sbp->bl, sbp->last_fs_block); */
- log_notice("Writing changes to disk\n");
+ if (!opts.no)
+ log_notice("Writing changes to disk\n");
bsync(sbp);
destroy(sbp);
log_notice("gfs2_fsck complete \n");
--- cluster/gfs2/fsck/metawalk.c 2007/09/16 17:14:45 1.11
+++ cluster/gfs2/fsck/metawalk.c 2007/09/17 17:08:20 1.12
@@ -750,7 +750,7 @@
}
}
- inode_put(ip, update); /* does a brelse */
+ inode_put(ip, opts.no ? not_updated : update); /* does a brelse */
return error;
}
--- cluster/gfs2/fsck/pass2.c 2007/05/15 18:11:10 1.7
+++ cluster/gfs2/fsck/pass2.c 2007/09/17 17:08:20 1.8
@@ -608,7 +608,7 @@
}
}
- brelse(bh, update);
+ brelse(bh, opts.no ? not_updated : update);
return 0;
}
--- cluster/gfs2/libgfs2/fs_ops.c 2007/06/26 01:43:17 1.10
+++ cluster/gfs2/libgfs2/fs_ops.c 2007/09/17 17:08:20 1.11
@@ -335,7 +335,8 @@
}
void block_map(struct gfs2_inode *ip, uint64_t lblock, int *new,
- uint64_t *dblock, uint32_t *extlen, int prealloc)
+ uint64_t *dblock, uint32_t *extlen, int prealloc,
+ enum update_flags if_changed)
{
struct gfs2_sbd *sdp = ip->i_sbd;
struct gfs2_buffer_head *bh;
@@ -377,7 +378,7 @@
for (x = 0; x < end_of_metadata; x++) {
lookup_block(ip, bh, x, mp, create, new, dblock);
- brelse(bh, updated);
+ brelse(bh, if_changed);
if (!*dblock)
goto out;
@@ -417,7 +418,7 @@
}
}
- brelse(bh, updated);
+ brelse(bh, if_changed);
out:
free(mp);
@@ -478,7 +479,8 @@
amount = sdp->bsize - o;
if (!extlen)
- block_map(ip, lblock, ¬_new, &dblock, &extlen, FALSE);
+ block_map(ip, lblock, ¬_new, &dblock, &extlen,
+ FALSE, not_updated);
if (dblock) {
bh = bread(sdp, dblock);
@@ -550,7 +552,8 @@
if (!extlen) {
new = TRUE;
- block_map(ip, lblock, &new, &dblock, &extlen, FALSE);
+ block_map(ip, lblock, &new, &dblock, &extlen, FALSE,
+ updated);
}
if (new) {
@@ -591,7 +594,7 @@
if (inode_is_stuffed(ip))
unstuff_dinode(ip);
- block_map(ip, lbn, &new, &dbn, NULL, prealloc);
+ block_map(ip, lbn, &new, &dbn, NULL, prealloc, not_updated);
if (!dbn)
die("get_file_buf\n");
--- cluster/gfs2/libgfs2/libgfs2.h 2007/09/16 17:14:45 1.18
+++ cluster/gfs2/libgfs2/libgfs2.h 2007/09/17 17:08:20 1.19
@@ -406,7 +406,8 @@
int gfs2_dirent_del(struct gfs2_inode *dip, struct gfs2_buffer_head *bh,
const char *filename, int filename_len);
void block_map(struct gfs2_inode *ip, uint64_t lblock, int *new,
- uint64_t *dblock, uint32_t *extlen, int prealloc);
+ uint64_t *dblock, uint32_t *extlen, int prealloc,
+ enum update_flags if_changed);
void gfs2_get_leaf_nr(struct gfs2_inode *dip, uint32_t index,
uint64_t *leaf_out);
void gfs2_put_leaf_nr(struct gfs2_inode *dip, uint32_t inx, uint64_t leaf_out);
^ permalink raw reply [flat|nested] 3+ messages in thread* [Cluster-devel] cluster/gfs2 fsck/main.c fsck/metawalk.c fsck/ ...
@ 2007-09-17 17:23 rpeterso
0 siblings, 0 replies; 3+ messages in thread
From: rpeterso @ 2007-09-17 17:23 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: rpeterso at sourceware.org 2007-09-17 17:23:40
Modified files:
gfs2/fsck : main.c metawalk.c pass2.c
gfs2/libgfs2 : fs_ops.c libgfs2.h
Log message:
Resolves: bz 291451: gfs2_fsck -n, Bad file descriptor on line 63 of
file buf.c
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/main.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.4.2.4&r2=1.4.2.5
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/metawalk.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.3.2.8&r2=1.3.2.9
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/pass2.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.4.2.3&r2=1.4.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/fs_ops.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.4.2.6&r2=1.4.2.7
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/libgfs2.h.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.7.2.11&r2=1.7.2.12
--- cluster/gfs2/fsck/main.c 2007/08/15 22:31:00 1.4.2.4
+++ cluster/gfs2/fsck/main.c 2007/09/17 17:23:40 1.4.2.5
@@ -283,6 +283,7 @@
struct gfs2_sbd sb;
struct gfs2_sbd *sbp = &sb;
int j;
+ enum update_flags update_sys_files;
memset(sbp, 0, sizeof(*sbp));
@@ -387,22 +388,24 @@
else
log_notice("Pass5 complete \n");
}
+ update_sys_files = (opts.no ? not_updated : updated);
/* Free up our system inodes */
- inode_put(sbp->md.inum, updated);
- inode_put(sbp->md.statfs, updated);
+ inode_put(sbp->md.inum, update_sys_files);
+ inode_put(sbp->md.statfs, update_sys_files);
for (j = 0; j < sbp->md.journals; j++)
- inode_put(sbp->md.journal[j], updated);
- inode_put(sbp->md.jiinode, updated);
- inode_put(sbp->md.riinode, updated);
- inode_put(sbp->md.qinode, updated);
- inode_put(sbp->md.pinode, updated);
- inode_put(sbp->md.rooti, updated);
- inode_put(sbp->master_dir, updated);
+ inode_put(sbp->md.journal[j], update_sys_files);
+ inode_put(sbp->md.jiinode, update_sys_files);
+ inode_put(sbp->md.riinode, update_sys_files);
+ inode_put(sbp->md.qinode, update_sys_files);
+ inode_put(sbp->md.pinode, update_sys_files);
+ inode_put(sbp->md.rooti, update_sys_files);
+ inode_put(sbp->master_dir, update_sys_files);
if (lf_dip)
- inode_put(lf_dip, updated);
+ inode_put(lf_dip, update_sys_files);
/* print_map(sbp->bl, sbp->last_fs_block); */
- log_notice("Writing changes to disk\n");
+ if (!opts.no)
+ log_notice("Writing changes to disk\n");
bsync(sbp);
destroy(sbp);
log_notice("gfs2_fsck complete \n");
--- cluster/gfs2/fsck/metawalk.c 2007/09/16 17:17:57 1.3.2.8
+++ cluster/gfs2/fsck/metawalk.c 2007/09/17 17:23:40 1.3.2.9
@@ -750,7 +750,7 @@
}
}
- inode_put(ip, update); /* does a brelse */
+ inode_put(ip, opts.no ? not_updated : update); /* does a brelse */
return error;
}
--- cluster/gfs2/fsck/pass2.c 2007/05/15 18:21:08 1.4.2.3
+++ cluster/gfs2/fsck/pass2.c 2007/09/17 17:23:40 1.4.2.4
@@ -608,7 +608,7 @@
}
}
- brelse(bh, update);
+ brelse(bh, opts.no ? not_updated : update);
return 0;
}
--- cluster/gfs2/libgfs2/fs_ops.c 2007/06/26 01:51:44 1.4.2.6
+++ cluster/gfs2/libgfs2/fs_ops.c 2007/09/17 17:23:40 1.4.2.7
@@ -335,7 +335,8 @@
}
void block_map(struct gfs2_inode *ip, uint64_t lblock, int *new,
- uint64_t *dblock, uint32_t *extlen, int prealloc)
+ uint64_t *dblock, uint32_t *extlen, int prealloc,
+ enum update_flags if_changed)
{
struct gfs2_sbd *sdp = ip->i_sbd;
struct gfs2_buffer_head *bh;
@@ -377,7 +378,7 @@
for (x = 0; x < end_of_metadata; x++) {
lookup_block(ip, bh, x, mp, create, new, dblock);
- brelse(bh, updated);
+ brelse(bh, if_changed);
if (!*dblock)
goto out;
@@ -417,7 +418,7 @@
}
}
- brelse(bh, updated);
+ brelse(bh, if_changed);
out:
free(mp);
@@ -478,7 +479,8 @@
amount = sdp->bsize - o;
if (!extlen)
- block_map(ip, lblock, ¬_new, &dblock, &extlen, FALSE);
+ block_map(ip, lblock, ¬_new, &dblock, &extlen,
+ FALSE, not_updated);
if (dblock) {
bh = bread(sdp, dblock);
@@ -550,7 +552,8 @@
if (!extlen) {
new = TRUE;
- block_map(ip, lblock, &new, &dblock, &extlen, FALSE);
+ block_map(ip, lblock, &new, &dblock, &extlen, FALSE,
+ updated);
}
if (new) {
@@ -591,7 +594,7 @@
if (inode_is_stuffed(ip))
unstuff_dinode(ip);
- block_map(ip, lbn, &new, &dbn, NULL, prealloc);
+ block_map(ip, lbn, &new, &dbn, NULL, prealloc, not_updated);
if (!dbn)
die("get_file_buf\n");
--- cluster/gfs2/libgfs2/libgfs2.h 2007/09/16 17:17:57 1.7.2.11
+++ cluster/gfs2/libgfs2/libgfs2.h 2007/09/17 17:23:40 1.7.2.12
@@ -406,7 +406,8 @@
int gfs2_dirent_del(struct gfs2_inode *dip, struct gfs2_buffer_head *bh,
const char *filename, int filename_len);
void block_map(struct gfs2_inode *ip, uint64_t lblock, int *new,
- uint64_t *dblock, uint32_t *extlen, int prealloc);
+ uint64_t *dblock, uint32_t *extlen, int prealloc,
+ enum update_flags if_changed);
void gfs2_get_leaf_nr(struct gfs2_inode *dip, uint32_t index,
uint64_t *leaf_out);
void gfs2_put_leaf_nr(struct gfs2_inode *dip, uint32_t inx, uint64_t leaf_out);
^ permalink raw reply [flat|nested] 3+ messages in thread* [Cluster-devel] cluster/gfs2 fsck/main.c fsck/metawalk.c fsck/ ...
@ 2007-09-17 17:25 rpeterso
0 siblings, 0 replies; 3+ messages in thread
From: rpeterso @ 2007-09-17 17:25 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL51
Changes by: rpeterso at sourceware.org 2007-09-17 17:25:23
Modified files:
gfs2/fsck : main.c metawalk.c pass2.c
gfs2/libgfs2 : fs_ops.c libgfs2.h
Log message:
Resolves: bz 291451: gfs2_fsck -n, Bad file descriptor on line 63 of
file buf.c
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/main.c.diff?cvsroot=cluster&only_with_tag=RHEL51&r1=1.4.2.3&r2=1.4.2.3.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/metawalk.c.diff?cvsroot=cluster&only_with_tag=RHEL51&r1=1.3.2.7.2.1&r2=1.3.2.7.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/pass2.c.diff?cvsroot=cluster&only_with_tag=RHEL51&r1=1.4.2.3&r2=1.4.2.3.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/fs_ops.c.diff?cvsroot=cluster&only_with_tag=RHEL51&r1=1.4.2.6&r2=1.4.2.6.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/libgfs2.h.diff?cvsroot=cluster&only_with_tag=RHEL51&r1=1.7.2.9.2.1&r2=1.7.2.9.2.2
--- cluster/gfs2/fsck/main.c 2007/05/01 18:20:49 1.4.2.3
+++ cluster/gfs2/fsck/main.c 2007/09/17 17:25:22 1.4.2.3.2.1
@@ -313,6 +313,7 @@
struct gfs2_sbd sb;
struct gfs2_sbd *sbp = &sb;
int j;
+ enum update_flags update_sys_files;
memset(sbp, 0, sizeof(*sbp));
@@ -417,22 +418,24 @@
else
log_notice("Pass5 complete \n");
}
+ update_sys_files = (opts.no ? not_updated : updated);
/* Free up our system inodes */
- inode_put(sbp->md.inum, updated);
- inode_put(sbp->md.statfs, updated);
+ inode_put(sbp->md.inum, update_sys_files);
+ inode_put(sbp->md.statfs, update_sys_files);
for (j = 0; j < sbp->md.journals; j++)
- inode_put(sbp->md.journal[j], updated);
- inode_put(sbp->md.jiinode, updated);
- inode_put(sbp->md.riinode, updated);
- inode_put(sbp->md.qinode, updated);
- inode_put(sbp->md.pinode, updated);
- inode_put(sbp->md.rooti, updated);
- inode_put(sbp->master_dir, updated);
+ inode_put(sbp->md.journal[j], update_sys_files);
+ inode_put(sbp->md.jiinode, update_sys_files);
+ inode_put(sbp->md.riinode, update_sys_files);
+ inode_put(sbp->md.qinode, update_sys_files);
+ inode_put(sbp->md.pinode, update_sys_files);
+ inode_put(sbp->md.rooti, update_sys_files);
+ inode_put(sbp->master_dir, update_sys_files);
if (lf_dip)
- inode_put(lf_dip, updated);
+ inode_put(lf_dip, update_sys_files);
/* print_map(sbp->bl, sbp->last_fs_block); */
- log_notice("Writing changes to disk\n");
+ if (!opts.no)
+ log_notice("Writing changes to disk\n");
bsync(sbp);
destroy(sbp);
log_notice("gfs2_fsck complete \n");
--- cluster/gfs2/fsck/metawalk.c 2007/09/16 17:19:03 1.3.2.7.2.1
+++ cluster/gfs2/fsck/metawalk.c 2007/09/17 17:25:22 1.3.2.7.2.2
@@ -750,7 +750,7 @@
}
}
- inode_put(ip, update); /* does a brelse */
+ inode_put(ip, opts.no ? not_updated : update); /* does a brelse */
return error;
}
--- cluster/gfs2/fsck/pass2.c 2007/05/15 18:21:08 1.4.2.3
+++ cluster/gfs2/fsck/pass2.c 2007/09/17 17:25:22 1.4.2.3.2.1
@@ -608,7 +608,7 @@
}
}
- brelse(bh, update);
+ brelse(bh, opts.no ? not_updated : update);
return 0;
}
--- cluster/gfs2/libgfs2/fs_ops.c 2007/06/26 01:51:44 1.4.2.6
+++ cluster/gfs2/libgfs2/fs_ops.c 2007/09/17 17:25:22 1.4.2.6.2.1
@@ -335,7 +335,8 @@
}
void block_map(struct gfs2_inode *ip, uint64_t lblock, int *new,
- uint64_t *dblock, uint32_t *extlen, int prealloc)
+ uint64_t *dblock, uint32_t *extlen, int prealloc,
+ enum update_flags if_changed)
{
struct gfs2_sbd *sdp = ip->i_sbd;
struct gfs2_buffer_head *bh;
@@ -377,7 +378,7 @@
for (x = 0; x < end_of_metadata; x++) {
lookup_block(ip, bh, x, mp, create, new, dblock);
- brelse(bh, updated);
+ brelse(bh, if_changed);
if (!*dblock)
goto out;
@@ -417,7 +418,7 @@
}
}
- brelse(bh, updated);
+ brelse(bh, if_changed);
out:
free(mp);
@@ -478,7 +479,8 @@
amount = sdp->bsize - o;
if (!extlen)
- block_map(ip, lblock, ¬_new, &dblock, &extlen, FALSE);
+ block_map(ip, lblock, ¬_new, &dblock, &extlen,
+ FALSE, not_updated);
if (dblock) {
bh = bread(sdp, dblock);
@@ -550,7 +552,8 @@
if (!extlen) {
new = TRUE;
- block_map(ip, lblock, &new, &dblock, &extlen, FALSE);
+ block_map(ip, lblock, &new, &dblock, &extlen, FALSE,
+ updated);
}
if (new) {
@@ -591,7 +594,7 @@
if (inode_is_stuffed(ip))
unstuff_dinode(ip);
- block_map(ip, lbn, &new, &dbn, NULL, prealloc);
+ block_map(ip, lbn, &new, &dbn, NULL, prealloc, not_updated);
if (!dbn)
die("get_file_buf\n");
--- cluster/gfs2/libgfs2/libgfs2.h 2007/09/16 17:19:03 1.7.2.9.2.1
+++ cluster/gfs2/libgfs2/libgfs2.h 2007/09/17 17:25:22 1.7.2.9.2.2
@@ -406,7 +406,8 @@
int gfs2_dirent_del(struct gfs2_inode *dip, struct gfs2_buffer_head *bh,
const char *filename, int filename_len);
void block_map(struct gfs2_inode *ip, uint64_t lblock, int *new,
- uint64_t *dblock, uint32_t *extlen, int prealloc);
+ uint64_t *dblock, uint32_t *extlen, int prealloc,
+ enum update_flags if_changed);
void gfs2_get_leaf_nr(struct gfs2_inode *dip, uint32_t index,
uint64_t *leaf_out);
void gfs2_put_leaf_nr(struct gfs2_inode *dip, uint32_t inx, uint64_t leaf_out);
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-09-17 17:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-17 17:08 [Cluster-devel] cluster/gfs2 fsck/main.c fsck/metawalk.c fsck/ rpeterso
-- strict thread matches above, loose matches on Subject: below --
2007-09-17 17:23 rpeterso
2007-09-17 17:25 rpeterso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).