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 313847 Details for
Bug 450764
RFE: GFS2: mkfs.gfs2 should have an optional fs size parm
[?]
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]
Addendum patch
450764.addendum.patch (text/plain), 2.15 KB, created by
Robert Peterson
on 2008-08-08 20:40:45 UTC
(
hide
)
Description:
Addendum patch
Filename:
MIME Type:
Creator:
Robert Peterson
Created:
2008-08-08 20:40:45 UTC
Size:
2.15 KB
patch
obsolete
> gfs2/mkfs/main_mkfs.c | 19 +++++++++++++------ > 1 files changed, 13 insertions(+), 6 deletions(-) > >diff --git a/gfs2/mkfs/main_mkfs.c b/gfs2/mkfs/main_mkfs.c >index 0db34e7..c31c2d0 100644 >--- a/gfs2/mkfs/main_mkfs.c >+++ b/gfs2/mkfs/main_mkfs.c >@@ -329,7 +329,7 @@ void check_mount(char *device) > */ > > static void >-print_results(struct gfs2_sbd *sdp) >+print_results(struct gfs2_sbd *sdp, uint64_t real_device_size) > { > if (sdp->debug) > printf("\n"); >@@ -343,7 +343,8 @@ print_results(struct gfs2_sbd *sdp) > > printf("Blocksize: %u\n", sdp->bsize); > printf("Device Size %.2f GB (%"PRIu64" blocks)\n", >- sdp->device_size / ((float)(1 << 30)) * sdp->bsize, sdp->device_size); >+ real_device_size / ((float)(1 << 30)), >+ real_device_size / sdp->bsize); > printf("Filesystem Size: %.2f GB (%"PRIu64" blocks)\n", > sdp->fssize / ((float)(1 << 30)) * sdp->bsize, sdp->fssize); > >@@ -376,6 +377,7 @@ main_mkfs(int argc, char *argv[]) > unsigned int x; > int error; > int rgsize_specified = 0; >+ uint64_t real_device_size; > > memset(sdp, 0, sizeof(struct gfs2_sbd)); > sdp->bsize = GFS2_DEFAULT_BSIZE; >@@ -412,14 +414,19 @@ main_mkfs(int argc, char *argv[]) > > /* Get the device geometry */ > >+ device_size(sdp->device_fd, &real_device_size); > device_geometry(sdp); > /* Convert optional block-count to basic blocks */ > if (sdp->orig_fssize) { > sdp->orig_fssize *= sdp->bsize; > sdp->orig_fssize >>= GFS2_BASIC_BLOCK_SHIFT; >- if (sdp->orig_fssize > sdp->device.length) >- die("specified block count is smaller than the" >- "actual device.\n"); >+ if (sdp->orig_fssize > sdp->device.length) { >+ fprintf(stderr, "%s: Specified block count is bigger " >+ "than the actual device.\n", prog_name); >+ die("Device Size is %.2f GB (%"PRIu64" blocks)\n", >+ real_device_size / ((float)(1 << 30)), >+ real_device_size / sdp->bsize); >+ } > sdp->device.length = sdp->orig_fssize; > } > fix_device_geometry(sdp); >@@ -460,5 +467,5 @@ main_mkfs(int argc, char *argv[]) > die("error closing device (%d): %s\n", > error, strerror(errno)); > >- print_results(sdp); >+ print_results(sdp, real_device_size); > }
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 450764
:
308968
| 313847