]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
This is a little C-program that can be used to print out the list
authormckusick <mckusick@FreeBSD.org>
Fri, 9 Feb 2018 19:10:46 +0000 (19:10 +0000)
committermckusick <mckusick@FreeBSD.org>
Fri, 9 Feb 2018 19:10:46 +0000 (19:10 +0000)
commit9ccdf8ab4d699de295bd18bcb59464d2b6753569
tree647b920f60e8d28b5c5fb84d55750e705742ef36
parenta4b6eaee0133f0cd8f2cf3b82281c878240fb6f2
This is a little C-program that can be used to print out the list
of blocks used by a requested list of inodes.

For example, to list the blocks referenced by your kernel:

guest_12 % df /
Filesystem      1K-blocks     Used   Avail Capacity  Mounted on
/dev/gpt/rootfs  20307196 10707336 7975288    57%    /

guest_12 % ls -i /boot/kernel/kernel
160603 /boot/kernel/kernel

guest_12 % ./prtblknos /dev/gpt/rootfs 160603
160603: lbn 0-7 blkno 3217584-3217647
lbn 8-11 blkno 3217864-3217895 distance 216
First-level indirect, blkno 3217896-3217903 distance 0
lbn 12-19 blkno 3217904-3217967 distance 8
lbn 20-75 blkno 3251816-3252263 distance 33848
lbn 76-83 blkno 3252368-3252431 distance 104
lbn 84-91 blkno 3252464-3252527 distance 32
lbn 92-852 blkno 3252896-3258983 distance 368

Each contiguous range of blocks is printed on a line.
The distance metric is the size of the gap from the end of the
previous set of blocks to the beginning of the next set of blocks.
Short distances are desirable.
tools/diag/README
tools/diag/prtblknos/Makefile [new file with mode: 0644]
tools/diag/prtblknos/README [new file with mode: 0644]
tools/diag/prtblknos/prtblknos.c [new file with mode: 0644]