Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 261981 Details for
Bug 382581
GFS2: gfs2_fsck: buffer still held for block: 162646118 (0x9b1c866)
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to fix the problem (try #3)
382581.gfs2_fsck.try3.patch (text/plain), 6.46 KB, created by
Robert Peterson
on 2007-11-16 23:17:28 UTC
(
hide
)
Description:
Patch to fix the problem (try #3)
Filename:
MIME Type:
Creator:
Robert Peterson
Created:
2007-11-16 23:17:28 UTC
Size:
6.46 KB
patch
obsolete
>? edit.new >? fsck/pass1.b4bob.c >? fsck/pass1.hosed.c >? fsck/pass1c.hosed.c >? man/gfs2_jadd.8.349601 >? man/gfs2_tool.8.349601 >? tool/gfs2_tool.h.argh >? tool/util.b4.c >? tool/util.c >? tool/util.prev.c >Index: fsck/metawalk.c >=================================================================== >RCS file: /cvs/cluster/cluster/gfs2/fsck/metawalk.c,v >retrieving revision 1.13 >diff -w -u -p -p -u -r1.13 metawalk.c >--- fsck/metawalk.c 18 Sep 2007 18:14:04 -0000 1.13 >+++ fsck/metawalk.c 16 Nov 2007 23:14:13 -0000 >@@ -463,9 +463,11 @@ static int check_leaf_eattr(struct gfs2_ > 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,7 +489,7 @@ static int check_indirect_eattr(struct g > 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)) { > ea_leaf_ptr = (uint64_t *)(indirect_buf->b_data >Index: fsck/pass1.c >=================================================================== >RCS file: /cvs/cluster/cluster/gfs2/fsck/pass1.c,v >retrieving revision 1.11 >diff -w -u -p -p -u -r1.11 pass1.c >--- fsck/pass1.c 18 Sep 2007 18:14:04 -0000 1.11 >+++ fsck/pass1.c 16 Nov 2007 23:14:13 -0000 >@@ -143,7 +143,6 @@ static int check_eattr_indir(struct gfs2 > 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 @@ static int check_eattr_indir(struct gfs2 > 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 @@ static int check_eattr_leaf(struct gfs2_ > 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 @@ static int check_eattr_leaf(struct gfs2_ > gfs2_block_set(bl, block, gfs2_meta_eattr); > bc->ea_count++; > } >- brelse(leaf_bh, not_updated); > } > *bh = leaf_bh; > >Index: fsck/pass1c.c >=================================================================== >RCS file: /cvs/cluster/cluster/gfs2/fsck/pass1c.c,v >retrieving revision 1.7 >diff -w -u -p -p -u -r1.7 pass1c.c >--- fsck/pass1c.c 18 Sep 2007 18:14:04 -0000 1.7 >+++ fsck/pass1c.c 16 Nov 2007 23:14:13 -0000 >@@ -77,7 +77,6 @@ int check_eattr_leaf(struct gfs2_inode * > int *update = (int *) private; > struct gfs2_sbd *sbp = ip->i_sbd; > struct gfs2_block_query q; >- struct gfs2_buffer_head *leaf_bh; > > if(gfs2_check_range(sbp, block)) { > log_err("Extended attributes block out of range...removing\n"); >@@ -96,9 +95,8 @@ int check_eattr_leaf(struct gfs2_inode * > return 1; > } > else >- leaf_bh = bread(sbp, block); >+ *bh = bread(sbp, block); > >- *bh = leaf_bh; > return 0; > } > >@@ -237,9 +235,11 @@ int pass1c(struct gfs2_sbd *sbp) > > if (skip_this_pass || fsck_abort) /* if asked to skip the rest */ > return 0; >- log_info("EA in inode %"PRIu64" (0x%" PRIx64 ")\n", block_no, >- block_no); > bh = bread(sbp, block_no); >+ if (gfs2_check_meta(bh, GFS2_METATYPE_IN)) { /* if a dinode */ >+ log_info("EA in inode %"PRIu64" (0x%" PRIx64 ")\n", >+ block_no, block_no); >+ gfs2_block_clear(bl, block_no, gfs2_eattr_block); > ip = inode_get(sbp, bh); > > log_debug("Found eattr at %"PRIu64" (0x%" PRIx64 ")\n", >@@ -248,6 +248,7 @@ int pass1c(struct gfs2_sbd *sbp) > error = check_inode_eattr(ip, &pass1c_fxns); > if(error < 0) { > stack; >+ brelse(bh, not_updated); > return -1; > } > >@@ -255,6 +256,7 @@ int pass1c(struct gfs2_sbd *sbp) > gfs2_dinode_out(&ip->i_di, bh->b_data); > > free(ip); >+ } > brelse(bh, update); > > block_no++; >Index: fsck/pass2.c >=================================================================== >RCS file: /cvs/cluster/cluster/gfs2/fsck/pass2.c,v >retrieving revision 1.9 >diff -w -u -p -p -u -r1.9 pass2.c >--- fsck/pass2.c 18 Sep 2007 18:14:04 -0000 1.9 >+++ fsck/pass2.c 16 Nov 2007 23:14:14 -0000 >@@ -89,18 +89,13 @@ int set_dotdot_dir(struct gfs2_sbd *sbp, > static int check_eattr_indir(struct gfs2_inode *ip, uint64_t block, > uint64_t parent, struct gfs2_buffer_head **bh, void *private) > { >- >+ *bh = bread(ip->i_sbd, block); > return 0; > } > static int check_eattr_leaf(struct gfs2_inode *ip, uint64_t block, > uint64_t parent, struct gfs2_buffer_head **bh, void *private) > { >-#if 0 >- struct gfs2_buffer_head *leaf_bh; >- >- leaf_bh = bread(ip->i_sbd, block); >- brelse(leaf_bh); >-#endif >+ *bh = bread(ip->i_sbd, block); > return 0; > } > >Index: fsck/pass5.c >=================================================================== >RCS file: /cvs/cluster/cluster/gfs2/fsck/pass5.c,v >retrieving revision 1.5 >diff -w -u -p -p -u -r1.5 pass5.c >--- fsck/pass5.c 28 Jun 2007 23:41:37 -0000 1.5 >+++ fsck/pass5.c 16 Nov 2007 23:14:14 -0000 >@@ -81,7 +81,6 @@ int check_block_status(struct gfs2_sbd * > while(byte < end) { > rg_status = ((*byte >> bit) & GFS2_BIT_MASK); > block = rg_data + *rg_block; >- log_debug("Checking block %" PRIu64 "\n", block); > warm_fuzzy_stuff(block); > if (skip_this_pass || fsck_abort) /* if asked to skip the rest */ > return 0;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 382581
:
258161
|
260481
| 261981