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 147928 Details for
Bug 221743
gfs2_fsck errors still
[?]
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
221743.patch (text/plain), 2.39 KB, created by
Robert Peterson
on 2007-02-12 19:24:30 UTC
(
hide
)
Description:
patch to fix the problem
Filename:
MIME Type:
Creator:
Robert Peterson
Created:
2007-02-12 19:24:30 UTC
Size:
2.39 KB
patch
obsolete
>Index: fs_recovery.c >=================================================================== >RCS file: /cvs/cluster/cluster/gfs2/fsck/fs_recovery.c,v >retrieving revision 1.4 >diff -w -u -p -p -u -r1.4 fs_recovery.c >--- fs_recovery.c 15 Jun 2006 18:48:45 -0000 1.4 >+++ fs_recovery.c 12 Feb 2007 18:57:31 -0000 >@@ -25,65 +25,6 @@ > #define RANDOM(values) ((values) * (random() / (RAND_MAX + 1.0))) > > /* >- * reconstruct_single_journal - write a fresh journal >- * @sdp: superblock >- * @jnum: journal number >- * >- * This function will write a fresh journal over the top of >- * the previous journal. All journal information is lost. This >- * process is basically stolen from write_journals() in the mkfs code. >- * >- * Returns: -1 on error, 0 otherwise >- */ >-static int reconstruct_single_journal(struct gfs2_sbd *sdp, int jnum){ >- struct gfs2_log_header lh; >- unsigned int blocks; >- struct gfs2_inode *ip = sdp->md.journal[jnum]; >- uint64_t seq; >- uint64_t dblock; >- uint32_t hash, extlen; >- unsigned int x; >- int new = 0; >- >- blocks = ip->i_di.di_blocks; >- srandom(time(NULL)); >- seq = RANDOM(blocks); >- >- log_info("Clearing journal %d\n", jnum); >- >- memset(&lh, 0, sizeof(struct gfs2_log_header)); >- lh.lh_header.mh_magic = GFS2_MAGIC; >- lh.lh_header.mh_type = GFS2_METATYPE_LH; >- lh.lh_header.mh_format = GFS2_FORMAT_LH; >- lh.lh_flags = GFS2_LOG_HEAD_UNMOUNT; >- >- for (x = 0; x < blocks; x++) { >- struct gfs2_buffer_head *bh; >- >- block_map(ip, x, &new, &dblock, &extlen); >- bh = bread(sdp, dblock); >- if (!bh) { >- log_err("Unable to read journal block at %" PRIu64 >- " (0x%" PRIx64")\n", dblock, dblock); >- return -1; >- } >- >- lh.lh_sequence = seq; >- lh.lh_blkno = x; >- gfs2_log_header_out(&lh, bh->b_data); >- hash = gfs2_disk_hash(bh->b_data, sizeof(struct gfs2_log_header)); >- ((struct gfs2_log_header *)bh->b_data)->lh_hash = cpu_to_be32(hash); >- brelse(bh, updated); >- >- if (++seq == blocks) >- seq = 0; >- } >- >- return 0; >-} >- >- >-/* > * reconstruct_journals - write fresh journals > * sdp: the super block > * >@@ -103,8 +44,9 @@ int reconstruct_journals(struct gfs2_sbd > * the gfs2_fsck */ > if((i % 2) == 0) > log_at_notice("."); >- if(reconstruct_single_journal(sdp, i)) >- return -1; >+ write_journal(sdp, sdp->md.journal[i], i, >+ sdp->md.journal[i]->i_di.di_size / sdp->sd_sb.sb_bsize); >+ /* Can't use d_di.di_blocks because that also includes metadata. */ > } > log_notice("\nJournals cleared.\n"); > 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 221743
:
144994
|
147731
|
147732
|
147733
|
147734
|
147735
|
147736
|
147737
|
147738
|
147739
| 147928