From: Eric Sandeen Date: Thu, 18 Jul 2002 18:25:04 +0000 (+0000) Subject: set v2 log if log sunit is specified X-Git-Tag: v2.2.0~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b2a8226a9713dd56c18f3a60cfb283a2e2ff1b91;p=thirdparty%2Fxfsprogs-dev.git set v2 log if log sunit is specified --- diff --git a/doc/CHANGES b/doc/CHANGES index cf41e4947..b0b401891 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -3,6 +3,8 @@ xfsprogs-2.1.2 (17 July 2002) man page. Also fix suffix handling for data su/sw options (disallow unit suffixes on -d sunit,swidth,sw and -l sunit). Add "s" (512-byte sectors) as valid suffix. + - Automatically select v2 logs if a log stripe unit is + specified. xfsprogs-2.1.1 (04 July 2002) - Build infrastructure updates so that configure options can be diff --git a/man/man8/mkfs.xfs.8 b/man/man8/mkfs.xfs.8 index 1b3d53740..9ce80cb66 100644 --- a/man/man8/mkfs.xfs.8 +++ b/man/man8/mkfs.xfs.8 @@ -349,6 +349,8 @@ Using the suboption to specify a version 2 log enables the .B sunit suboption, and allows the logbsize to be increased beyond 32K. +Version 2 logs are automatically selected if a log stripe unit +is specified. See \f3sunit\f1 and \f3su\f1 suboptions, below. .IP The .B sunit @@ -364,6 +366,8 @@ such as software raid5 when the sunit is specified as the filesystem block size. The equivalent byte value must be a multiple of the filesystem block size. +Version 2 logs are automatically selected if the log \f3su\f1 +suboption is specified. .IP The .B su @@ -375,6 +379,8 @@ suboption is used to specify the log stripe. The suboption value has to be specified in bytes, (usually using the \f3s\f1 or \f3b\f1 suffixes). This value must be a multiple of the filesystem block size. +Version 2 logs are automatically selected if the log \f3su\f1 +suboption is specified. .TP .B \-n Naming options. diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c index b7f6645bb..587d80321 100644 --- a/mkfs/xfs_mkfs.c +++ b/mkfs/xfs_mkfs.c @@ -1236,6 +1236,12 @@ main(int argc, char **argv) usage(); } + /* if lsu or lsunit was specified, automatically use v2 logs */ + if (lsu || lsunit) { + fprintf(stderr, "log stripe unit specified, using v2 logs\n"); + logversion = 2; + } + calc_stripe_factors(dsu, dsw, lsu, &dsunit, &dswidth, &lsunit); /* other global variables */