All of lore.kernel.org
 help / color / mirror / Atom feed
* extracting thin mappings in real time
@ 2018-10-03 12:40 Thanos Makatos
  2018-10-03 13:03 ` Joe Thornber
  0 siblings, 1 reply; 8+ messages in thread
From: Thanos Makatos @ 2018-10-03 12:40 UTC (permalink / raw)
  To: dm-devel; +Cc: thornber


[-- Attachment #1.1: Type: text/plain, Size: 1084 bytes --]

I have a kernel module that sits on top of a thin device mapper target that
receives block I/O requests and re-submits then to the thin target. I would
like to implement the following functionality: whenever I receive a write
completion from the thin target (assuming that it's the first time a block
written to) I would like to extract the newly-established mapping of that
virtual block.

I know that I can do this using thin_dump, however this involves:
(1) spawning a process
(2) reserving/releasing a metadata snapshot, and
(3) dumping _all_ the mappings.

In other words, it's far to heavyweight for my performance requirements.

Ideally I would like to be able to obtain the mapping in kernel space. I
had a look at thin_dump and from what I understand it directly reads the
B-tree from the disk? Is there some kernel function that already does this?
E.g. given a thin LBA return the physical block address.

Also, regarding having to have reserved a metadata snapshot, is this
necessary for obtaining mappings? Aren't mappings immutable once established
?

-- 
Thanos Makatos

[-- Attachment #1.2: Type: text/html, Size: 1787 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-10-05 15:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-03 12:40 extracting thin mappings in real time Thanos Makatos
2018-10-03 13:03 ` Joe Thornber
2018-10-03 14:13   ` Thanos Makatos
2018-10-03 14:47     ` Joe Thornber
2018-10-03 15:47       ` Thanos Makatos
2018-10-04 12:56         ` Joe Thornber
2018-10-05 11:33           ` Thanos Makatos
2018-10-05 15:53             ` Thanos Makatos

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.