On Fri, Aug 22, 2014 at 12:37:12PM -0400, Theodore Ts'o wrote: > 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 Not according to the man page: blocks-count is the number of blocks on the device. Perhaps the documentation needs to be updated to match reality? Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx -- 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