[dm-devel] are there usage examples for dm_sm_metadata_{create|open}?

John Utz John.Utz at wdc.com
Tue May 6 15:59:30 UTC 2014


Sweet! I am gonna jump right on studying dm-era today and will get back to you guys with any Q.

tnx so much for you help Joe!

johnu
________________________________________
From: dm-devel-bounces at redhat.com [dm-devel-bounces at redhat.com] on behalf of Joe Thornber [thornber at redhat.com]
Sent: Tuesday, May 06, 2014 6:17 AM
To: device-mapper development
Subject: Re: [dm-devel] are there usage examples for dm_sm_metadata_{create|open}?

HI John,

On Sat, May 03, 2014 at 02:24:48AM +0000, John Utz wrote:
> So, the stuff in persistent-data sure seems like a good candidate for getting the job done. :-)

It's nice that you're considering using the pd library.  Probably the
simplest user of pd is the dm-era target.

> It seems like the first basic action one would want to perform would
> be to create a metadata 'blob' and then at some point in the future
> one would regularly want to open said metadata blob. The
> dm_sm_metadata_create and open functions seem perfect for the job.
> But for some reason, I am unable to find a place in the md directory
> where this is getting used.

Use dm_tm_create_with_sm(), this creates both the transaction manager,
which you *must* have, and the metadata space map.  See the comment at
the end of drivers/md/persistent-data/dm-transaction-manager.h

> I would have thought that dm-cache-metadata.c would be using it, but
  it doesnt seem to be thinking about this in the same way. It uses
  dm_block_manager_create() and __create_persistent_data_objects().

It does, indirectly.

- Joe

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




More information about the dm-devel mailing list