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 147527 Details for
Bug 222308
mkfs and journal addition for GFS2 should produce contiguous journals
[?]
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 allow contiguous journal allocation from mkfs
222308.patch (text/plain), 4.43 KB, created by
Robert Peterson
on 2007-02-07 00:57:46 UTC
(
hide
)
Description:
Patch to allow contiguous journal allocation from mkfs
Filename:
MIME Type:
Creator:
Robert Peterson
Created:
2007-02-07 00:57:46 UTC
Size:
4.43 KB
patch
obsolete
>Index: fs_ops.c >=================================================================== >RCS file: /cvs/cluster/cluster/gfs2/libgfs2/fs_ops.c,v >retrieving revision 1.4 >diff -w -u -p -p -u -r1.4 fs_ops.c >--- fs_ops.c 12 Jun 2006 20:38:27 -0000 1.4 >+++ fs_ops.c 7 Feb 2007 00:53:20 -0000 >@@ -335,7 +335,7 @@ static void lookup_block(struct gfs2_ino > } > > void block_map(struct gfs2_inode *ip, uint64_t lblock, int *new, >- uint64_t *dblock, uint32_t *extlen) >+ uint64_t *dblock, uint32_t *extlen, int prealloc) > { > struct gfs2_sbd *sdp = ip->i_sbd; > struct gfs2_buffer_head *bh; >@@ -395,6 +395,7 @@ void block_map(struct gfs2_inode *ip, ui > bh = bread(sdp, *dblock); > } > >+ if (!prealloc) > lookup_block(ip, bh, end_of_metadata, mp, create, new, dblock); > > if (extlen && *dblock) { >@@ -480,7 +481,7 @@ int gfs2_readi(struct gfs2_inode *ip, vo > amount = sdp->bsize - o; > > if (!extlen) >- block_map(ip, lblock, ¬_new, &dblock, &extlen); >+ block_map(ip, lblock, ¬_new, &dblock, &extlen, FALSE); > > if (dblock) { > bh = bread(sdp, dblock); >@@ -552,7 +553,7 @@ int gfs2_writei(struct gfs2_inode *ip, v > > if (!extlen) { > new = TRUE; >- block_map(ip, lblock, &new, &dblock, &extlen); >+ block_map(ip, lblock, &new, &dblock, &extlen, FALSE); > } > > if (new) { >@@ -583,7 +584,8 @@ int gfs2_writei(struct gfs2_inode *ip, v > return copied; > } > >-struct gfs2_buffer_head *get_file_buf(struct gfs2_inode *ip, uint64_t lbn) >+struct gfs2_buffer_head *get_file_buf(struct gfs2_inode *ip, uint64_t lbn, >+ int prealloc) > { > struct gfs2_sbd *sdp = ip->i_sbd; > uint64_t dbn; >@@ -592,11 +594,11 @@ struct gfs2_buffer_head *get_file_buf(st > if (inode_is_stuffed(ip)) > unstuff_dinode(ip); > >- block_map(ip, lbn, &new, &dbn, NULL); >+ block_map(ip, lbn, &new, &dbn, NULL, prealloc); > if (!dbn) > die("get_file_buf\n"); > >- if (new && >+ if (!prealloc && new && > ip->i_di.di_size < (lbn + 1) << sdp->bsize_shift) > ip->i_di.di_size = (lbn + 1) << sdp->bsize_shift; > >Index: libgfs2.h >=================================================================== >RCS file: /cvs/cluster/cluster/gfs2/libgfs2/libgfs2.h,v >retrieving revision 1.9 >diff -w -u -p -p -u -r1.9 libgfs2.h >--- libgfs2.h 23 Jan 2007 19:23:06 -0000 1.9 >+++ libgfs2.h 7 Feb 2007 00:53:20 -0000 >@@ -391,7 +391,8 @@ int gfs2_readi(struct gfs2_inode *ip, vo > uint64_t offset, unsigned int size); > int gfs2_writei(struct gfs2_inode *ip, void *buf, > uint64_t offset, unsigned int size); >-struct gfs2_buffer_head *get_file_buf(struct gfs2_inode *ip, uint64_t lbn); >+struct gfs2_buffer_head *get_file_buf(struct gfs2_inode *ip, uint64_t lbn, >+ int prealloc); > struct gfs2_buffer_head *init_dinode(struct gfs2_sbd *sdp, > struct gfs2_inum *inum, > unsigned int mode, uint32_t flags, >@@ -408,7 +409,7 @@ void dir_add(struct gfs2_inode *dip, cha > 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); >+ uint64_t *dblock, uint32_t *extlen, int prealloc); > void gfs2_get_leaf_nr(struct gfs2_inode *dip, uint32_t index, > uint64_t *leaf_out); > int gfs2_freedi(struct gfs2_sbd *sdp, uint64_t block); >Index: structures.c >=================================================================== >RCS file: /cvs/cluster/cluster/gfs2/libgfs2/structures.c,v >retrieving revision 1.6 >diff -w -u -p -p -u -r1.6 structures.c >--- structures.c 22 Nov 2006 18:39:38 -0000 1.6 >+++ structures.c 7 Feb 2007 00:53:20 -0000 >@@ -105,7 +105,15 @@ void build_journal(struct gfs2_inode *ji > lh.lh_flags = GFS2_LOG_HEAD_UNMOUNT; > > for (x = 0; x < blocks; x++) { >- struct gfs2_buffer_head *bh = get_file_buf(ip, ip->i_di.di_size >> sdp->bsize_shift); >+ struct gfs2_buffer_head *bh = >+ get_file_buf(ip, (ip->i_di.di_size >> sdp->bsize_shift) + x, TRUE); >+ if (!bh) >+ die("build_journals\n"); >+ brelse(bh, updated); >+ } >+ for (x = 0; x < blocks; x++) { >+ struct gfs2_buffer_head *bh = >+ get_file_buf(ip, (ip->i_di.di_size >> sdp->bsize_shift), FALSE); > if (!bh) > die("build_journals\n"); > >@@ -209,7 +217,7 @@ build_quota_change(struct gfs2_inode *pe > GFS2_DIF_SYSTEM); > > for (x = 0; x < blocks; x++) { >- struct gfs2_buffer_head *bh = get_file_buf(ip, ip->i_di.di_size >> sdp->bsize_shift); >+ struct gfs2_buffer_head *bh = get_file_buf(ip, ip->i_di.di_size >> sdp->bsize_shift, FALSE); > if (!bh) > die("build_quota_change\n"); >
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 222308
:
147527
|
147620
|
147922