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

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

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