zfsonlinux/zfs — pull request #979 by dechamps (2012-09-20 10:10:47+00:00)
Title: Force 4K blocksize when testing ext2 on zvol.

Currently, mkfs.ext2 on zconfig.sh zvols tries to use a 8K blocksize, probably because by default zvol exposes an optimal I/O size of 8K.

Unfortunately, a ext2 blocksize of 8K is not supported by the kernel, so the resulting filesystem is unmountable.

This patch fixes the issue by making sure the blocksize is 4K. We have to use -F to force it else mkfs.ext2 won't allow us to use a blocksize smaller than the optimal I/O size.