From: rpeterso@sourceware.org <rpeterso@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/gfs2 convert/gfs2_convert.c libgfs2/st ...
Date: 6 Jun 2007 15:21:13 -0000 [thread overview]
Message-ID: <20070606152113.13956.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: rpeterso at sourceware.org 2007-06-06 15:21:12
Modified files:
gfs2/convert : gfs2_convert.c
gfs2/libgfs2 : structures.c
gfs2/man : mkfs.gfs2.8
gfs2/mkfs : main_mkfs.c
Log message:
Resolves: Bugzilla Bug 242056: GFS2 needs block sizes < 4k (mkfs changes)
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/convert/gfs2_convert.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.7.2.2&r2=1.7.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/structures.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.5.2.3&r2=1.5.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/man/mkfs.gfs2.8.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.3&r2=1.1.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mkfs/main_mkfs.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.8.2.5&r2=1.8.2.6
--- cluster/gfs2/convert/gfs2_convert.c 2007/05/01 18:20:49 1.7.2.2
+++ cluster/gfs2/convert/gfs2_convert.c 2007/06/06 15:21:12 1.7.2.3
@@ -773,17 +773,6 @@
close(sbp->device_fd);
exit(-1);
}
- if (sbp->sd_sb.sb_bsize != GFS2_DEFAULT_BSIZE) {
- log_crit("Error: GFS2 only supports a 4K block size.\n");
- log_crit("Volume %s has a block size of ", device);
- if (!(sbp->sd_sb.sb_bsize % 1024)) /* if even K boundary */
- log_crit("%dK bytes.\n", sbp->sd_sb.sb_bsize / 1024);
- else
- log_crit("%d bytes.\n", sbp->sd_sb.sb_bsize);
- log_crit("This file system cannot be converted with this tool.\n");
- close(sbp->device_fd);
- exit(-1);
- }
/* get gfs1 rindex inode - gfs1's rindex inode ptr became __pad2 */
gfs2_inum_in(&inum, (char *)&raw_gfs1_ondisk_sb.sb_rindex_di);
sbp->md.riinode = gfs2_load_inode(sbp, inum.no_addr);
--- cluster/gfs2/libgfs2/structures.c 2007/05/15 18:21:08 1.5.2.3
+++ cluster/gfs2/libgfs2/structures.c 2007/06/06 15:21:12 1.5.2.4
@@ -55,7 +55,7 @@
/* Zero out the beginning of the device up to the superblock */
for (x = 0; x < sdp->sb_addr; x++) {
bh = bget(sdp, x);
- memset(bh->b_data, 0, GFS2_DEFAULT_BSIZE);
+ memset(bh->b_data, 0, sdp->bsize);
bh->b_uninit = TRUE;
brelse(bh, updated);
}
--- cluster/gfs2/man/mkfs.gfs2.8 2006/12/19 17:52:14 1.1.2.3
+++ cluster/gfs2/man/mkfs.gfs2.8 2007/06/06 15:21:12 1.1.2.4
@@ -15,6 +15,14 @@
.SH OPTIONS
.TP
+\fB-b\fP \fIBlockSize\fR
+Set the filesystem block size to \fIBlockSize\fR (must be a power of
+two). The minimum block size is 512. The FS block size cannot exceed
+the machine's memory page size. On the most architectures (i386,
+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
Initial size of each journal's quota change file
.TP
--- cluster/gfs2/mkfs/main_mkfs.c 2007/05/11 16:53:32 1.8.2.5
+++ cluster/gfs2/mkfs/main_mkfs.c 2007/06/06 15:21:12 1.8.2.6
@@ -58,6 +58,7 @@
printf("\n");
printf("Options:\n");
printf("\n");
+ printf(" -b <bytes> Filesystem block size\n");
printf(" -c <MB> Size of quota change file\n");
printf(" -D Enable debugging code\n");
printf(" -h Print this help, then exit\n");
@@ -91,9 +92,12 @@
strcpy(sdp->lockproto, "lock_nolock");
while (cont) {
- optchar = getopt(argc, argv, "-c:DhJ:j:Op:qr:t:u:VX");
+ optchar = getopt(argc, argv, "-b:c:DhJ:j:Op:qr:t:u:VX");
switch (optchar) {
+ case 'b':
+ sdp->bsize = atoi(optarg);
+ break;
case 'c':
sdp->qcsize = atoi(optarg);
@@ -192,6 +196,7 @@
if (sdp->debug) {
printf("Command Line Arguments:\n");
+ printf(" bsize = %u\n", sdp->bsize);
printf(" qcsize = %u\n", sdp->qcsize);
printf(" jsize = %u\n", sdp->jsize);
printf(" journals = %u\n", sdp->md.journals);
next reply other threads:[~2007-06-06 15:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-06 15:21 rpeterso [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-06-06 15:19 [Cluster-devel] cluster/gfs2 convert/gfs2_convert.c libgfs2/st rpeterso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070606152113.13956.qmail@sourceware.org \
--to=rpeterso@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.