[Top] [All Lists]

RE: different error messages for mkfs.xfs -ssize

To: "Wengang Wang" <wen.gang.wang@xxxxxxxxxx>, <xfs@xxxxxxxxxxx>
Subject: RE: different error messages for mkfs.xfs -ssize
From: "Kinzel, David" <David.Kinzel@xxxxxxxxxx>
Date: Thu, 22 Apr 2010 10:18:39 -0600
Cc: <greg.marsden@xxxxxxxxxx>, <joe.jin@xxxxxxxxxx>
In-reply-to: <20100422153636.GB3822@xxxxxxxxxxxxxxxxx>
References: <20100422153636.GB3822@xxxxxxxxxxxxxxxxx>
Thread-index: AcriMr/fJyp7lK5ZRyi7uDBTNaBXCgABFzLg
Thread-topic: different error messages for mkfs.xfs -ssize
>-----Original Message-----
>From: xfs-bounces@xxxxxxxxxxx [mailto:xfs-bounces@xxxxxxxxxxx] 
>On Behalf Of Wengang Wang
>Sent: Thursday, April 22, 2010 9:37 AM
>To: xfs@xxxxxxxxxxx
>Cc: greg.marsden@xxxxxxxxxx; joe.jin@xxxxxxxxxx
>Subject: different error messages for mkfs.xfs -ssize
>Hi experts,
>I got different error messages when provide different value for -ssize.
>Why the error messages are different? They are different but no one is
>containing more info than the other.

1639         if (sectorsize < XFS_MIN_SECTORSIZE ||
1640             sectorsize > XFS_MAX_SECTORSIZE || sectorsize >
blocksize) {
1641                 fprintf(stderr, _("illegal sector size %d\n"),
1642                 usage();
1643         }

According to the defaults:

62 #define XFS_MIN_SECTORSIZE_LOG  9       /* i.e. 512 bytes */

Looks like your sectorsize is not greater than XFS_MIN_SECTORSIZE
(illegal sector size)

For 3072,

1561                                         if (sectorsize <= 0 ||
1562                                             !ispow2(sectorsize))
1563                                                 illegal(value, "s

3072 is not a power of two (illegal value)

>[root@desk test-xfsprogs]# mkfs.xfs -ssize=256 /dev/sda10 -f 
>2>&1 |head -n 1
>illegal sector size 256
>[root@desk test-xfsprogs]# mkfs.xfs -ssize=3072 /dev/sda10 -f 
>2>&1 |head -n 1
>Illegal value 3072 for -s sectsize option
>xfs mailing list

This email communication and any files transmitted with it may contain 
confidential and or proprietary information and is provided for the use of the 
intended recipient only.  Any review, retransmission or dissemination of this 
information by anyone other than the intended recipient is prohibited.  If you 
receive this email in error, please contact the sender and delete this 
communication and any copies immediately.  Thank you.

<Prev in Thread] Current Thread [Next in Thread>