views:

55

answers:

1

Is there any way in the kernel to get a list of blocks that have been physically written to and the order in which they were written?

+2  A: 

Looks like blktrace can produce this information.

Eric Seppanen
+1, though it does get a little flakey when dealing with device mapper and write barriers (or at least it did mid last year when I was using it) .. to discover that device mapper had issues with write barriers in certain situations.
Tim Post
I'm actually trying to find a way to do this in the kernel programmatically. I want to get block numbers as they are written to from within the linux kernel source code.
SpdStr