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 308968 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]
Proposed patch
450764.rhel5.patch (text/plain), 3.73 KB, created by
Robert Peterson
on 2008-06-11 17:27:19 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Robert Peterson
Created:
2008-06-11 17:27:19 UTC
Size:
3.73 KB
patch
obsolete
> gfs2/man/mkfs.gfs2.8 | 11 ++++++++--- > gfs2/mkfs/main_mkfs.c | 29 ++++++++++++++++++++++++----- > 2 files changed, 32 insertions(+), 8 deletions(-) > >diff --git a/gfs2/man/mkfs.gfs2.8 b/gfs2/man/mkfs.gfs2.8 >index b411467..cf0736c 100644 >--- a/gfs2/man/mkfs.gfs2.8 >+++ b/gfs2/man/mkfs.gfs2.8 >@@ -8,7 +8,7 @@ mkfs.gfs2 - Make a GFS2 filesystem > > .SH SYNOPSIS > .B mkfs.gfs2 >-[\fIOPTION\fR]... \fIDEVICE\fR >+[\fIOPTION\fR]... \fIDEVICE\fR \fI[ block-count ]\fR > > .SH DESCRIPTION > mkfs.gfs2 is used to create a Global File System. >@@ -23,7 +23,7 @@ x86_64, s390, s390x), the memory page size is 4096 bytes. On other > architectures it may be bigger. The default block size is 4096 bytes. > In general, GFS2 filesystems should not deviate from the default value. > .TP >-\fB-c MegaBytes\fP >+\fB-c\fP \fIMegaBytes\fR > Initial size of each journal's quota change file > .TP > \fB-D\fP >@@ -73,12 +73,17 @@ Fsname is a unique file system name used to distinguish this GFS2 file > system from others created (1 to 16 characters). Lock_nolock doesn't > use this field. > .TP >-\fB-u MegaBytes\fP >+\fB-u\fP \fIMegaBytes\fR > Initial size of each journal's unlinked tag file > .TP > \fB-V\fP > Print program version information, then exit. > >+.TP >+[ \fIblock-count\fR ] >+Make the file system this many blocks in size. If not specified, the >+entire length of the specified device is used. >+ > .SH EXAMPLE > .TP > gfs2_mkfs -t mycluster:mygfs2 -p lock_dlm -j 2 /dev/vg0/mygfs2 >diff --git a/gfs2/mkfs/main_mkfs.c b/gfs2/mkfs/main_mkfs.c >index f66a990..0db34e7 100644 >--- a/gfs2/mkfs/main_mkfs.c >+++ b/gfs2/mkfs/main_mkfs.c >@@ -55,7 +55,7 @@ print_usage(void) > { > printf("Usage:\n"); > printf("\n"); >- printf("%s [options] <device>\n", prog_name); >+ printf("%s [options] <device> [ block-count ]\n", prog_name); > printf("\n"); > printf("Options:\n"); > printf("\n"); >@@ -90,6 +90,7 @@ decode_arguments(int argc, char *argv[], struct gfs2_sbd *sdp) > > memset(sdp->device_name, 0, sizeof(sdp->device_name)); > sdp->md.journals = 1; >+ sdp->orig_fssize = 0; > > while (cont) { > optchar = getopt(argc, argv, "-b:c:DhJ:j:Op:qr:t:u:VX"); >@@ -173,10 +174,13 @@ decode_arguments(int argc, char *argv[], struct gfs2_sbd *sdp) > case 1: > if (strcmp(optarg, "gfs2") == 0) > continue; >- if (sdp->device_name[0]) { >- die("More than one device specified (try -h for help)"); >- } >- strcpy(sdp->device_name, optarg); >+ if (!sdp->device_name[0]) >+ strcpy(sdp->device_name, optarg); >+ else if (!sdp->orig_fssize && >+ isdigit(optarg[0])) >+ sdp->orig_fssize = atol(optarg); >+ else >+ die("More than one device specified (try -h for help)\n"); > break; > > default: >@@ -192,6 +196,9 @@ decode_arguments(int argc, char *argv[], struct gfs2_sbd *sdp) > die("no device specified (try -h for help)\n"); > > if (optind < argc) >+ sdp->orig_fssize = atol(argv[optind++]); >+ >+ if (optind < argc) > die("Unrecognized argument: %s\n", argv[optind]); > > if (sdp->debug) { >@@ -210,6 +217,9 @@ decode_arguments(int argc, char *argv[], struct gfs2_sbd *sdp) > printf(" table = %s\n", sdp->locktable); > printf(" utsize = %u\n", sdp->utsize); > printf(" device = %s\n", sdp->device_name); >+ if (sdp->orig_fssize) >+ printf(" block-count = %llu\n", >+ (unsigned long long)sdp->orig_fssize); > } > } > >@@ -403,6 +413,15 @@ main_mkfs(int argc, char *argv[]) > /* Get the device geometry */ > > 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"); >+ sdp->device.length = sdp->orig_fssize; >+ } > fix_device_geometry(sdp); > > /* Compute the resource group layouts */
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