Lines Matching defs:cluster
350 * and the cluster has some leading bytes.
352 * of the cluster, and our size is:
358 * read the whole cluster size. Or we're at the
425 * If we couldn't find the cluster in the writable disk,
439 fatalx("%s: writing reserved cluster", __func__);
473 off_t l2sz, l1off, l2tab, l2off, cluster, clusteroff;
502 cluster = be64toh(buf);
504 * cluster may be 0, but all future operations don't affect
508 *inplace = !!(cluster & QCOW2_INPLACE);
509 if (cluster & QCOW2_COMPRESSED)
513 cluster &= ~QCOW2_INPLACE;
514 if (cluster)
516 return cluster + clusteroff;
523 * Allocates a new cluster on disk, creating a new L2 table
524 * if needed. The cluster starts off with a refs of one,
528 * cluster of the write offset if it exists.
533 off_t l2sz, l1off, l2tab, l2off, cluster, clusteroff, orig;
538 cluster = -1;
574 cluster = disk->end;
576 buf = htobe64(cluster | QCOW2_INPLACE);
578 fatalx("%s: could not write cluster", __func__);
584 inc_refs(disk, cluster, 1);
588 if (cluster + clusteroff < disk->clustersz)
590 return cluster + clusteroff;
593 /* Copies a cluster containing src to dst. Src and dst need not be aligned. */
605 fatal("%s: could not read cluster", __func__);
607 fatal("%s: could not write cluster", __func__);
642 fatal("could not read ref cluster");
737 /* Extend to desired size, and add one refcount cluster */
742 * Paranoia: if our disk image takes more than one cluster