aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libf2fs_io.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2014-08-29 11:46:25 -0700
committerJP Abgrall <jpa@google.com>2014-09-08 14:55:01 -0700
commitdc530859c5e422b10ab70bc3b9d4b7ff0d004d57 (patch)
tree6ef0f9a5c24f554a1da48d56dc52a30492512da1 /lib/libf2fs_io.c
parentfffeed796a79fa6621d01b0e4c5fa18d9d89cdd7 (diff)
downloadandroid_external_f2fs-tools-dc530859c5e422b10ab70bc3b9d4b7ff0d004d57.tar.gz
android_external_f2fs-tools-dc530859c5e422b10ab70bc3b9d4b7ff0d004d57.tar.bz2
android_external_f2fs-tools-dc530859c5e422b10ab70bc3b9d4b7ff0d004d57.zip
fsck.f2fs: fix inode block inconsistency
This patch is to fix inode block inconsistency such as iblocks and ilinks. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'lib/libf2fs_io.c')
-rw-r--r--lib/libf2fs_io.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libf2fs_io.c b/lib/libf2fs_io.c
index d5ced53..0c89ee4 100644
--- a/lib/libf2fs_io.c
+++ b/lib/libf2fs_io.c
@@ -46,6 +46,11 @@ int dev_write(void *buf, __u64 offset, size_t len)
return 0;
}
+int dev_write_block(void *buf, __u64 blk_addr)
+{
+ return dev_write(buf, blk_addr * F2FS_BLKSIZE, F2FS_BLKSIZE);
+}
+
int dev_write_dump(void *buf, __u64 offset, size_t len)
{
if (lseek64(config.dump_fd, (off64_t)offset, SEEK_SET) < 0)