Chris Kirby wrote:
> Ah, OK, I didn't catch the distinction between the keys.
> 
> So is it possible for a snapshot to have a different unwrapping key
> than the head dataset?  I would think not, since the blocks in a snapshot
> were created as part of the head ds.

A snapshot always has the same unwrapping key and same actual encryption 
key as the head dataset.   A clone will have the same actual encryption 
key (and currently has the same wrapped key but I'm looking at changing 
that).

> I'm wondering whether the dsl_dir_t is the more logical place to keep
> the unwrapping key.  Although that doesn't solve this issue, since the
> dsl_dir_t structs come and go from memory too.

Indeed - I looked at that as a possible place and objset_t as well.

One possibility is that I create a hash table based on objset id's that 
is hung off the spa.  The advantage this has is that it is the objset id 
I have when I need to look the key up (a zbookmark_t really) - which is 
the performance critical part.

-- 
Darren J Moffat

Reply via email to