Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
maintain existing bookmark zap entry length (openzfs#118)
We get EOVERFLOW (which causes the "Value too large" message) from zap_entry_read() when trying to read a ZAP entry and the provided buffer is too small to hold the entire value. In this case we are doing zap_lookup_impl() in the bookmark zap object (ds_bookmarks_obj). The dsl_bookmark_phys_t is one word longer on Linux than on (our version of) illumos. (The additional word is zbm_ivset_guid, used by the encryption feature.) We aren't creating any bookmarks on linux (before migration completes), but there are some additional code paths that can result in updating existing bookmarks to use the new, larger size which is incompatible with illumos. Specifically, dsl_bookmark_sync_done() updates bookmarks that are at or after the most recent snapshot, whenever there's a write to the dataset. This update increases the size to be incompatible with illumos. Based on preliminary testing, that seems to be the case we're hitting. Additionally, when we destroy a snapshot that has bookmarks at or just before it, we will update those bookmarks via dsl_bookmark_ds_destroyed(). The solution is to maintain the existing bookmark length when updating the bookmark's FBN values. External issue: DLPX-67744
- Loading branch information