#ifndef __ZVFS_COMMON_UTILS_H__
#define __ZVFS_COMMON_UTILS_H__

#include <stddef.h>
#include <stdint.h>

int zvfs_calc_io_units(uint64_t offset_bytes,
                       size_t   len_bytes,
                       uint32_t io_unit_size,
                       uint64_t *unit_offset,
                       uint64_t *unit_len,
                       uint32_t *buf_offset_out);

int zvfs_calc_ceil_units(uint64_t bytes,
                         uint64_t unit_size,
                         uint64_t *units_out);

#endif // __ZVFS_COMMON_UTILS_H__
