bug-ddrescue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-ddrescue] Mapfile update mechanism


From: Eliyahu Saks
Subject: [Bug-ddrescue] Mapfile update mechanism
Date: Tue, 24 Jul 2018 11:08:09 +0300

Hi, thanks for your great work.

I've writing a FUSE driver that presents a damaged drive as a file that's
copy-on-read: any reads to the file are checked against a mapfile; if they
have already been read the data is returned immediately from the ddrescue
image file, if not, ddrescue is invoked on the requested sectors, and then
the data is returned from the image file.

Understandably, invoking ddrescue on every read is very inefficient
(parsing arguments, loading the mapfile, logging, etc.).

I've looked through the source code to see where I can 'hook' in to an
existing rescuebook and rescue parts of the file on demand.

I see that the constructor for Mapbook calls:

    split_by_domain_borders( domain_ );

which seems to limit the mapfile sblock_vector to blocks in the domain.
When updating the original mapfile, how/where are these blocks merged into
the entire (pre-domain) mapfile? The code in update_mapfile seems the write
just the existing (domain-limited) sblock_vector?

Thanks,

E. Saks


reply via email to

[Prev in Thread] Current Thread [Next in Thread]