]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
mkfs can improperly generate an error when the data subvolume stripe unit is
authorGlen Overby <overby@sgi.com>
Mon, 18 Aug 2003 20:23:00 +0000 (20:23 +0000)
committerGlen Overby <overby@sgi.com>
Mon, 18 Aug 2003 20:23:00 +0000 (20:23 +0000)
larger than 256kb, which is larger than the maximum log stripe unit size.

So, only set and check the log stripe unit on version 2 internal logs, and
default the stripe unit size to 32kb if the data volume's stripe unit
size is too big.
Only set and check the log stripe unit on version 2 internal logs, and
default the stripe unit size to 32kb if the data volume's stripe unit
size is too big.

mkfs/xfs_mkfs.c

index 1914ae6185e90f00ccb1c9369f74b7c1a76c5bec..574287370639485bee4163af2a536eed040837e7 100644 (file)
@@ -1763,16 +1763,18 @@ an AG size that is one stripe unit smaller, for example %llu.\n"),
                }
                /* convert from 512 byte blocks to fs blocks */
                lsunit = DTOBT(lsunit);
-       } else if (dsunit) {
+       } else if (logversion == 2 && loginternal && dsunit) {
                /* lsunit and dsunit now in fs blocks */
                lsunit = dsunit;
        }
 
-       if ((lsunit * blocksize) > 256 * 1024) {
+       if (logversion == 2 && (lsunit * blocksize) > 256 * 1024) {
                fprintf(stderr,
 _("log stripe unit (%d bytes) is too large for kernel to handle (max 256k)\n"),
                        (lsunit * blocksize));
-               exit(1);
+               lsunit = 32 * 1024;
+               fprintf(stderr,
+                       _("log stripe unit adjusted to 256kb\n"));
        }
 
        protostring = setup_proto(protofile);