DragonFly users List (threaded) for 2009-09
[
Date Prev][
Date Next]
[
Thread Prev][Thread Next]
[
Date Index][
Thread Index]
Re: reading hammer inode contents
:Hi,
:
:How is it possible for me to read the contents on i-nodes in hammer?
:Also list the i-nodes that are in use or used earlier?
:
:Thanks
:
:--Siju
There is no hammer directive that will do this in a human readable way
(well, except 'hammer show' which has the nasty side effect of wanting
to dump everything, including bulk data).
But it is easy to dump the raw inodes, including any historical
(deleted or replaced older versions) of inodes using the
HAMMERIOC_MIRROR_READ ioctl.
You would have to write some C code and you would have to learn a bit
about constructing B-Tree key ranges for the ioctl, and then you
would have to parse out the records from the mirroring stream.
Then you could print out the inode records in a human readable form.
It would make a nice little mini-project if someone wants to try
writing the extension to the hammer utility to do it. There are some
good examples... the 'hammer mirror-dump' directive parses stuff out
into a human readable form so you have to glue together constructing
the correct B-Tree range with some conditionals to just extract the
inode records and then push the results through code similar to what
hammer mirror-dump does to print the inodes out in human-readable form.
What do you need the inode data for?
-Matt
Matthew Dillon
<dillon@backplane.com>
[
Date Prev][
Date Next]
[
Thread Prev][Thread Next]
[
Date Index][
Thread Index]