/* The cluster offset may be an allocated byte offset in the image file, the zero cluster marker, or the unallocated cluster marker.  */
static void qed_update_l2_table(BDRVQEDState *s, QEDTable *table, int index, unsigned int n, uint64_t cluster)
/* The cluster offset may be an allocated byte offset in the image file, the zero cluster marker, or the unallocated cluster marker.  */
static void qed_update_l2_table(BDRVQEDState *s, QEDTable *table, int index, unsigned int n, uint64_t cluster)
{
    int i;
    for (i = index; i < index + n; i++) {
        table->offsets[i] = cluster;
        if (!qed_offset_is_unalloc_cluster(cluster) &&
            !qed_offset_is_zero_cluster(cluster)) {
            cluster += s->header.cluster_size;
        }
    }
}