Home | History | Annotate | Download | only in block

Lines Matching refs:l2_offset

749     uint64_t *l1_table, *l2_table, l2_offset, offset, l1_size2, l1_allocated;
781 l2_offset = l1_table[i];
782 if (l2_offset) {
783 old_l2_offset = l2_offset;
784 l2_offset &= ~QCOW_OFLAG_COPIED;
786 if (bdrv_pread(bs->file, l2_offset, l2_table, l2_size) != l2_size)
830 l2_offset, l2_table, l2_size) < 0)
835 refcount = update_cluster_refcount(bs, l2_offset >> s->cluster_bits, addend);
837 refcount = get_refcount(bs, l2_offset >> s->cluster_bits);
842 l2_offset |= QCOW_OFLAG_COPIED;
844 if (l2_offset != old_l2_offset) {
845 l1_table[i] = l2_offset;
935 uint16_t *refcount_table, int refcount_table_size, int64_t l2_offset,
946 if (bdrv_pread(bs->file, l2_offset, l2_table, l2_size) != l2_size)
1027 uint64_t *l1_table, l2_offset, l1_size2;
1050 l2_offset = l1_table[i];
1051 if (l2_offset) {
1054 refcount = get_refcount(bs, (l2_offset & ~QCOW_OFLAG_COPIED)
1057 fprintf(stderr, "Can't get refcount for l2_offset %"
1058 PRIx64 ": %s\n", l2_offset, strerror(-refcount));
1061 if ((refcount == 1) != ((l2_offset & QCOW_OFLAG_COPIED) != 0)) {
1062 fprintf(stderr, "ERROR OFLAG_COPIED: l2_offset=%" PRIx64
1063 " refcount=%d\n", l2_offset, refcount);
1069 l2_offset &= ~QCOW_OFLAG_COPIED;
1071 l2_offset, s->cluster_size);
1074 if (l2_offset & (s->cluster_size - 1)) {
1075 fprintf(stderr, "ERROR l2_offset=%" PRIx64 ": Table is not "
1076 "cluster aligned; L1 entry corrupted\n", l2_offset);
1082 refcount_table_size, l2_offset, check_copied);