fibmap: fix wrong block count

This is an obvious bug fix patch.

Change-Id: Ib604a9b27f72b40e2bb3c3fcc001623f031e3abe
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
mkfs: completely abstract the dev IO during format

This change allows for f2fs_format to work on a non-standard device (e.g.
sparse-memory backed file).
Removes direct access to config.fd from within f2fs_format.c.

Now, f2fs_format_device() can be made to work against any device by
providing
 f2fs_finalize_device()
 f2fs_trim_device()
and the lib2fs.c functions
  ASCIIToUNICODE
  dev_write
  f2fs_cal_crc32
  f2fs_set_bit
  log_base_2

This will allow Android's fastboot to use f2fs against a libsparse.

Change-Id: Ic4653fae0a422f0bb2b4d1b7101a04785709007c
Signed-off-by: JP Abgrall <jpa@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>