tools: add f2fs_io
PATCH 1/2 tools: add f2fs_io
This is initial commit to support shutdown ioctl.
Signed-off-by Jaegeuk Kim <[email protected]>
--- configure.ac | 1 + tools/Makefile.am | 2 +- tools/f2fs_io/Android.bp | 15 ++++ tools/f2fs_io/Makefile.am | 8 ++ tools/f2fs_io/f2fs_io.c | 171 ++++++++++++++++++++++++++++++++++++++ tools/f2fs_io/f2fs_io.h | 109 ++++++++++++++++++++++++ 6 files changed, 305 insertions(+), 1 deletion(-) create mode 100644 tools/f2fs_io/Android.bp create mode 100644 tools/f2fs_io/Makefile.am create mode 100644 tools/f2fs_io/f2fs_io.c create mode 100644 tools/f2fs_io/f2fs_io.h
configure.ac +1 -0
@@ -209,6 +209,7 @@ AC_CONFIG_FILES([ fsck/Makefile tools/Makefile tools/sg_write_buffer/Makefile + tools/f2fs_io/Makefile ]) # export library version info for mkfs/libf2fs_format_la
tools/Makefile.am +1 -1
@@ -14,4 +14,4 @@ f2fscrypt_LDFLAGS = -luuid dist_man_MANS = f2fscrypt.8 endif -SUBDIRS = sg_write_buffer +SUBDIRS = sg_write_buffer f2fs_io
tools/f2fs_io/Android.bp new file +15 -0
@@ -0,0 +1,15 @@ +cc_defaults { + name: "f2fs-io-defaults", + cflags: [ + "-Wno-unused-function" + ], +} + +cc_binary { + name: "f2fs_io", + defaults: [ "f2fs-io-defaults" ], + srcs: [ + "f2fs_io.c", + ], + product_specific: true, +}
tools/f2fs_io/Makefile.am new file +8 -0
@@ -0,0 +1,8 @@ +## Makefile.am + +if LINUX +AM_CPPFLAGS = -I./include +AM_CFLAGS = -Wall +sbin_PROGRAMS = f2fs_io +f2fs_io_SOURCES = f2fs_io.c +endif
tools/f2fs_io/f2fs_io.c new file +171 -0
171 lines not on this page · raw message
tools/f2fs_io/f2fs_io.h new file +109 -0
109 lines not on this page · raw message
Signature · 1 line
2.19.0.605.g01d371f741-goog
PATCH 2/2 fsck.f2fs: check nat_bits separately from bug_on
It checks nat_bits separately, and enable it seamlessly.
Signed-off-by Jaegeuk Kim <[email protected]>
--- fsck/fsck.c | 2 +- fsck/mount.c | 2 +- include/f2fs_fs.h | 1 + 3 files changed, 3 insertions(+), 2 deletions(-)
fsck/fsck.c +1 -1
@@ -2676,7 +2676,7 @@ int fsck_verify(struct f2fs_sb_info *sbi)if (force || (c.fix_on && !c.ro)) {struct f2fs_checkpoint *cp =F2FS_CKPT (sbi); -if (force || c.bug_on) { +if (force || c.bug_on || c.bug_nat_bits) {/* flush nats to write_nit_bits below */ flush_journal_entries (sbi);fix_hard_links (sbi);
fsck/mount.c +1 -1
@@ -1242,7 +1242,7 @@ out:if (!err) {MSG (0 ,"Info: Checked valid nat_bits in checkpoint\n" ); }else { - c.bug_on =1 ; + c.bug_nat_bits =1 ;MSG (0 ,"Info: Corrupted valid nat_bits in checkpoint\n" ); }return err;
include/f2fs_fs.h +1 -0
@@ -372,6 +372,7 @@ struct f2fs_configuration {int force;int defset;int bug_on; +int bug_nat_bits;int alloc_failed;int auto_fix;int quota_fix;
Signature · 1 line
2.19.0.605.g01d371f741-goog
Re: [PATCH 2/2] fsck.f2fs: check nat_bits separately from bug_on
Quoted 3 lines · Jaegeuk Kim
It checks
nat_bitsseparately, and enable it seamlessly.Signed-off-by Jaegeuk Kim <[email protected]>
Reviewed-by Chao Yu <[email protected]>
Thanks,
Quoted 3 lines · Jaegeuk Kim
This is initial commit to support shutdown ioctl.
Signed-off-by Jaegeuk Kim <[email protected]>
Reviewed-by Chao Yu <[email protected]>
Thanks,