Re: [PATCH 2/6] common: _scratch_mkfs_sized should inherent default block size from test_dev

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Fri, Aug 22, 2014 at 07:48:07PM +0400, Dmitry Monakhov wrote:
> No, This will not works. Looks like you have missed the point.
> helper has following signature:
> _scratch_mkfs_sized <size in bytes> [optional blocksize]
> But mke2fs accept filesystem size accounted in fs-blocks, so in order
> to convert size in blocks to number of blocks we have to figure out blocksize.

Ah, sorry.  I didn't understand what problem you were trying to solve.

But mke2fs does accept the filesystem size accounted in kilobytes (and
megabytes, gigabytes, etc.).  So you could just take the size in
bytes, divide by 1024, and then append 'k', i.e:

       mke2fs $MKFS_OPTS $DEVICE $(expr $bytes / 1024)k

This will work regardless of the block size.

Cheers,

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux