Christoph Hellwig wrote:
> On Wed, Mar 03, 2010 at 05:19:21PM +1100, Dave Chinner wrote:
>> When making a specifically sized scratch filesystem, we need to
>> calculate the size rather than assigning the caclculation expression
>> to a variable and passing that into the _scratch_mkfs_sized
>> function. Currently sized filesystems are failing to be made and the
>> code is falling back to full sized filesystems so we are not testing
>> enospc issues correctly.
> This seems rather fragile. Maybe instead of calculating the bignums
> which I suspect are the problem could we pass symbolic values like 104M
> in and parse them in _scratch_mkfs_sized?
How about making _scratch_mkfs_sized something like:
fssize=`echo $1 | bc`
as a quick test this seems to work:
SIZE2=`echo $SIZE | bc`
yields the right answers for both numbers & expressions passed in: