When mkfs.ext4dev with flex_bg option, resize2fs with -M option will fail.
While calculate how many blocks need to move, the result is wrong. Because
some block groups have no meta_data if mkfs.ext4dev with flex_bg option,
all meta_data are stored in the flex group.
Steps to reproduce:
# mkfs.ext4dev -O flex_bg /dev/sda6
# resize2fs /dev/sda6 -M
resize2fs: No space left on device while trying to resize /dev/sda6