Dear Everyone, As some people know, I have been working on libzfs_core extensions and I currently have a prototype lzc_list command that is a large subset of the functionality of `zfs list`.
After discussing it with others, I suspect that implementing an in-core pool metadata snapshot facility for lzc_list would be the most natural way of implementing lzc_list. The in-core pool snapshot would atomically pin the metadata state of a pool on disk for `zfs list` without holding locks while it is traversed (my first implementation) or requiring that we pin memory via holds on dsl_dataset_t objects until the operation is finished (my second implementation). While the in-core pool metadata snapshot is in effect, the blocks containing the pool metadata would not be marked free in the in-core free space_map, but it would be marked free in the on-disk space map when it would normally be marked as such. That has the downside that disk space would not be freed right away, but we make no guarantees of immediately freeing disk space anyway, so I suspect that is okay. Would this be something entirely new or is there already a way to snapshot the pool's metadata state in-core either of which I am unaware or in a branch somewhere? Yours truly, Richard Yao
_______________________________________________ developer mailing list [email protected] http://lists.open-zfs.org/mailman/listinfo/developer
