mkfs: Handle gfs2 creation on regular files
mkfs.gfs2 previously exited if the target volume was a regular file.
This patch allows creation of gfs2 file systems on regular files by
removing an exiting check, guarding against calling device_topology()
and falling back to the default block size if the target is a regular
file. It also removes the check_mount() function and replaces it with an
fstat() call after opening the file to avoid races.
rhbz#720668
Signed-off-by: Andrew Price <anprice@redhat.com>
Reviewed-by: Steven Whitehouse <swhiteho@redhat.com>