Update version on mkfs

Change-Id: Id2204ac86db6b52c327830657d80aabfdd3b8a33
f2fs-tools: add inline data check

Add inline data check

Change-Id: I88d948b2b2567d7d3b1b0d4e088d40a611b9c755
Signed-off-by: Weihong Xu <weihong.xu@intel.com>
Signed-off-by: Huajun Li <huajun.li@intel.com>
Signed-off-by: Haicheng Li <haicheng.li@linux.intel.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
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>
fix typo around CONFIG_64BIT usage

Would do 64 BITS_PER_LONG when CONFIG_64BIT was NOT defined,
causing BITS_PER_LONG to be wrong on 32bit systems.

Change-Id: Iae32521f8686a07e7f17bc656a5f6ddf5ca853f5
Signed-off-by: JP Abgrall <jpa@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
mkfs: write the cp page 2 of the checkpoint pack 2 during format

Currently mkfs followed by fsck will fail with

  [f2fs_crc_valid: 351] CRC validation failed: cal_crc = 4076150800 blk_crc = 0 buff_size = 0x0

This is because the validatie_checkpoint() tries to read and checksum the
cp page 2, and it is invoked on both cp packs.
But format only writes the page 1 of the 2nd checkpoint pack.

Change-Id: I7903a04a5282d862955f97ce4fd665e2149f93d5
Signed-off-by: JP Abgrall <jpa@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
f2fs-tools: add f2fstat to print f2fs's status in sec

This tool prints /sys/kernel/debug/f2fs/status in sec so that we
can monitor variation of f2fs status.

Change-Id: I23a2ce2497e85927e7727a32d522468ce00dac28
Signed-off-by: Changman Lee <cm224.lee@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Allow to build latest changes with android

Change-Id: I4c71eae82d7e97082881494311528fce6d77c9ca
f2fs-tools: move fsck/fibmap.f2fs to tools/

Let's move miscellaneous utilities into tools directory.

-- Modified to allow android compiling.

Change-Id: Ic8bc61faab2318ca5478ab9eeeb86e733be6b6fa
Signed-off-by: Changman Lee <cm224.lee@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
fibmap.f2fs: add bdev information

This patch shows devname and start_lba based on zero sector.
fibmap reports related lba, sometimes we want to know absolute lba of
file to compare with blktrace.

Change-Id: Iba3cc99664339727d0a7c593c2f36117151bce44
Signed-off-by: Changman Lee <cm224.lee@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
f2fs-tools: resolve build warnings

Change-Id: Id0a64edd6dbb42ffab8f14c9e67671164b3114ba
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
mkfs: fix the wrong nat bitmap size

We should consider checksum bytes in the checkpoint block.
Previously, this bug incured very critical panics for node entry handling.

Change-Id: Icbf328749c01ff2ada9bdeae59ce4f9e2c0f66ae
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
f2fstat: add option to select partition to see status

If there are some partitions, this may select a partition to see its
status. If no selection, you will see first section of status.

e.g.) f2fstat -p /dev/sda3

Change-Id: If8a33af5f9a7f2e4d171e7730faf65a09dbb0103
Signed-off-by: Changman Lee <cm224.lee@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
mkfs, fsck: change the results for readability

This patch cleans up several printing formats.

Change-Id: Ief238c844b61e89d8c901c01a904849f6d86acd5
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
f2fstat: fix command-line options

In ARM, the char type is always defined as unsigned (which is allowed
by the C standard).  This caused the terminator return value of getopt (-1)
was being converted to 255 and thus never matched the loop exit condition.

Also printfs warning 'unknown option' has been removed from all the tools
because getopt() itself warns with a message.

Change-Id: I15e6b63162d3db0b07eff6810829fb5d38e5d699
f2fs-tools: create dump.f2fs symlink

Change-Id: Iac06fa3bc687fee5454e481b7d27eccc544ffe12
f2fs-tools: show version on all tools

Change-Id: I8b70bdfc754f38f50f8e3c889954cc627872d65e
f2fs-tools: release 1.3.0

Change-Id: Ie3be4f813228d5adfdd4be9e64ba90a7db2c9beb