From: Glen Overby Date: Mon, 18 Aug 2003 20:23:00 +0000 (+0000) Subject: mkfs can improperly generate an error when the data subvolume stripe unit is X-Git-Tag: v2.6.0~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d762552e8d0f6a25629c0392f48415ae38f80ff;p=thirdparty%2Fxfsprogs-dev.git mkfs can improperly generate an error when the data subvolume stripe unit is 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. --- diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c index 1914ae618..574287370 100644 --- a/mkfs/xfs_mkfs.c +++ b/mkfs/xfs_mkfs.c @@ -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);