/* Returns: 1 if in-sync, 0 if not-in-sync, -EWOULDBLOCK  */
static int userspace_in_sync(struct dm_dirty_log *log, region_t region, int can_block)
/* Returns: 1 if in-sync, 0 if not-in-sync, -EWOULDBLOCK  */
static int userspace_in_sync(struct dm_dirty_log *log, region_t region, int can_block)
{
	int r;
	uint64_t region64 = region;
	int64_t in_sync;
	size_t rdata_size;
	struct log_c *lc = log->context;
	if (!can_block)
		return -EWOULDBLOCK;
	rdata_size = sizeof(in_sync);
	r = userspace_do_request(lc, lc->uuid, DM_ULOG_IN_SYNC,
				 (char *)&region64, sizeof(region64),
				 (char *)&in_sync, &rdata_size);
	return (r) ? 0 : (int)in_sync;
}