Matthew Ahrens wrote: > Darren J Moffat wrote: >> Matthew Ahrens wrote: >>> Darren J Moffat wrote: >>>> My initial thought was using *dsl_dataset_phys_t* however that >>>> doesn't have sufficient space so it may be better to store a >>>> "pointer" there to some external object. >>> >>> Yep, I would recommend that you store each key in an object in the >>> MOS, and keep that object's number in the dsl_dataset_phys_t. (I'm >>> guessing that the key is around 1kB in size; if this is wrong let me >>> know.) >> >> Can you point me to which ZFS APIs I should be using for storing stuff >> in the MOS please. > > Use the normal DMU routines -- dmu_buf_hold, dmu_write, etc. See > dsl_dataset.c, especially dsl_dataset_create_sync_dd(). > > However, I realized that you should consider just storing the key using > the property infrastructure, which now supports non-inheritable > properties. See dsl_prop_set(). If this works then it will be cleaner.
can I have properties that don't appear in zfs(1) ? These aren't something I want to expose directly via zfs(1) (at least not just now). -- Darren J Moffat