Re: extracting thin mappings in real time

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

 



On Thu, 4 Oct 2018 at 13:56, Joe Thornber <thornber@xxxxxxxxxx> wrote:
>
> On Wed, Oct 03, 2018 at 04:47:41PM +0100, Thanos Makatos wrote:
> > poo metadata object can return this information? I've started looking
> > at  thin_bio_map(), is this the best place to start?
>
> See thin-metadata.h
>
> - Joe

I started looking at piggybacking the mapping in bio->bi_pivate in
provision_block and it looks ugly. First, I'll have to introduce a new
bio flag specifically for this reason: whenever dm-thin sees this it
should store the mapping in the bio->bi_private. Second, the bio
passed to dm-thin is cloned so I'll have to find the original bio
(this requires making struct dm_io public). And third, the original
bio can be split to multiple cloned bios so the structure in
bio->bi_pivate should accomodate this.

Instead I gave a second thought to the solution of using dm-thin's
public functions to access it's metadata, namely dm_thin_find_block.
The problem is that if the mapping is not in memory I'll have to read
it from disk, outside the critical path, and this adds complexity.
However, since the mapping was just established it should be cached so
it should mostly work (not being able to obtain the mapping every now
and then is acceptable). Does this make sense?

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux