sdimitro commented on this pull request.
> @@ -198,6 +198,100 @@ write_uint64(mdb_tgt_as_t as, mdb_tgt_addr_t addr, > uint64_t n, uint_t rdback) return (addr + sizeof (n)); } +/* + * Writes to objects of size 1, 2, 4, or 8 bytes. The function + * doesn't care if the object is a number or not (e.g. it could + * be a byte array, or a struct) as long as the size of the write + * is one of the aforementioned ones. + */ +static mdb_tgt_addr_t +write_var_uint(mdb_tgt_as_t as, mdb_tgt_addr_t addr, uint64_t val, size_t size, + uint_t rdback) +{ + if (size > sizeof (uintptr_t)) { Makes sense. I'll update the commit. Thank you for reviewing this. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/openzfs/openzfs/pull/544#discussion_r167407787 ------------------------------------------ openzfs-developer Archives: https://openzfs.topicbox.com/groups/developer/discussions/Ta82fe96bb714cae3-Mcb3ceeb7dedcceebb203ae1c Powered by Topicbox: https://topicbox.com