[Top] [All Lists]

Re: [PATCH 04/15] mkfs: validate all input values

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 04/15] mkfs: validate all input values
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Tue, 3 Dec 2013 01:42:07 -0800
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20131202231202.GA10988@dastard>
References: <1385689430-10103-1-git-send-email-david@xxxxxxxxxxxxx> <1385689430-10103-5-git-send-email-david@xxxxxxxxxxxxx> <20131202170420.GA14935@xxxxxxxxxxxxx> <20131202231202.GA10988@dastard>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Dec 03, 2013 at 10:12:02AM +1100, Dave Chinner wrote:
> How does this make sense, though?
> # mkfs.xfs -s size=4s /dev/vda
> Specifying the sector size in *sectors* is currently considered a
> valid thing to do. That's insane and fundamentally broken, because
> this
> # mkfs.xfs -b size=4s -s size=2s /dev/vda
> results in the block size conversion using a 512 byte sector size,
> and everything else using a 1024 byte sector size for conversions.
> e.g:
> # mkfs.xfs -b size=4s -s size=2s -n size=2s /dev/vda
> results in a block size of 2k (4*512) and a directory block size of
> 2k (2*1024). i.e. the result of unit conversion is dependent on
> where the sector size is specified on the command line!

True.  Guess we should indeed just outright rejecting it.  I was more
concerned about using the sector size before defined for other
parameters, but given how seldomly we specify it on the command line
anyway we're probably better off just using the normal table based

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