From 4d762552e8d0f6a25629c0392f48415ae38f80ff Mon Sep 17 00:00:00 2001 From: Glen Overby Date: Mon, 18 Aug 2003 20:23:00 +0000 Subject: [PATCH] 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. --- mkfs/xfs_mkfs.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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); -- 2.47.2