Re: LVM and XFS cannot set blocksize on block device

Timothy Shimmin
2006-10-02T07:27:41Z

Chris Wedgwood wrote:
> On Thu, Sep 28, 2006 at 08:23:43PM +1000, Tim Shimmin wrote:
>
>> I'll have a look soon at passing the mkfs.xfs -s option thru to
>> libxfs which is consistent with the existing code.
>
> (following up on something mentioned off the list)
>
> When you do this change please consider *not* making the code fallback
> to a different blocksize if the ioctl fails when "-s size=" is given.
>
> The logic here is that if someone clearly wants a specific value and
> if that cannot be met it should error out with a suitable message, not
> silently do something else.

I agree.
I prefer default behaviour to happen when we are using the defaults -
so we can do fallback behaviour under the assumption the user
doesn't mind.
But when we ask for something explicitly, then do it or error out.
:)

I'd be tempted to reuse libxfs_init_t's setblksize to be 1 as it currently
is if one wants the device blksize to be set and
>1 (really > 512 etc...) if one wants to set it to a particular value.

--Tim