On Tue, Jan 19, 2016 at 3:13 PM, RomanS <[email protected]> wrote:

> Hello.
>
> I want to store some snapshot-related data, so I do the following:
>
> uint64_t val = 1;
> dsl_dataset_zapify(ds, tx);
> zap_add(mos, ds->ds_object, "localhost:param", sizeof (val), 1, &val, tx);
>
> "ds" is a snapshot (data/d1@snap1).
> "mos" is ds->ds_dir->dd_pool->dp_meta_objset
>
>
> After that cannot import this pool, it says cannot open data/d1.
> zdb also says "cannot open data/d1", but shows my "param"
>
> What am I doing wrong?
>

Assuming that you are doing this in syncing context (e.g. from the
"syncfunc" callback of dsl_sync_task()), the code looks fine to me.

Can you elaborate on the zdb output and the output when doing "zpool
import"?  What arguments did you use and what exactly was the output?

--matt



>
> Thanks.
>
> _______________________________________________
> developer mailing list
> [email protected]
> http://lists.open-zfs.org/mailman/listinfo/developer
>
>
_______________________________________________
developer mailing list
[email protected]
http://lists.open-zfs.org/mailman/listinfo/developer

Reply via email to