This patch shows stat information about a file with fragmented state. Signed-off-by: Changman Lee <cm224....@samsung.com> --- fsck/fibmap.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/fsck/fibmap.c b/fsck/fibmap.c index 8726d3d..0ced7ca 100644 --- a/fsck/fibmap.c +++ b/fsck/fibmap.c @@ -26,6 +26,21 @@ void print_ext(struct file_ext *ext) ext->end_blk, ext->blk_count); } +void print_stat(struct stat64 *st) +{ + printf("--------------------------------------------\n"); + printf("dev [%d:%d]\n", major(st->st_dev), minor(st->st_dev)); + printf("ino [0x%8lx : %ld]\n", st->st_ino, st->st_ino); + printf("mode [0x%8x : %d]\n", st->st_mode, st->st_mode); + printf("nlink [0x%8lx : %ld]\n", st->st_nlink, st->st_nlink); + printf("uid [0x%8x : %d]\n", st->st_uid, st->st_uid); + printf("gid [0x%8x : %d]\n", st->st_gid, st->st_gid); + printf("size [0x%8lx : %ld]\n", st->st_size, st->st_size); + printf("blksize [0x%8lx : %ld]\n", st->st_blksize, st->st_blksize); + printf("blocks [0x%8lx : %ld]\n", st->st_blocks, st->st_blocks); + printf("--------------------------------------------\n\n"); +} + int main(int argc, char *argv[]) { int fd; @@ -61,6 +76,7 @@ int main(int argc, char *argv[]) total_blks = (st.st_size + st.st_blksize - 1) / st.st_blksize; printf("\n%s :\n", filename); + print_stat(&st); printf("file_pos start_blk end_blk blks\n"); blknum = 0; -- 1.7.10.4 ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel