Lines Matching refs:VHDX_LOG_SECTOR_SIZE

69     if (log->read % VHDX_LOG_SECTOR_SIZE) {  in vhdx_log_peek_hdr()
102 idx += VHDX_LOG_SECTOR_SIZE; in vhdx_log_inc_idx()
150 ret = bdrv_pread(bs->file, offset, VHDX_LOG_SECTOR_SIZE, buffer, 0); in vhdx_log_read_sectors()
201 ret = bdrv_co_pwrite(bs->file, offset, VHDX_LOG_SECTOR_SIZE, buffer_tmp, 0); in vhdx_log_write_sectors()
205 buffer_tmp += VHDX_LOG_SECTOR_SIZE; in vhdx_log_write_sectors()
234 if (hdr->entry_length % (VHDX_LOG_SECTOR_SIZE)) { in vhdx_log_hdr_is_valid()
283 if (desc->file_offset % VHDX_LOG_SECTOR_SIZE) { in vhdx_log_desc_is_valid()
288 if (desc->zero_length % VHDX_LOG_SECTOR_SIZE == 0) { in vhdx_log_desc_is_valid()
364 desc_sectors * VHDX_LOG_SECTOR_SIZE); in vhdx_log_read_desc()
428 buffer = qemu_blockalign(bs, VHDX_LOG_SECTOR_SIZE); in vhdx_log_flush_desc()
460 memset(buffer, 0, VHDX_LOG_SECTOR_SIZE); in vhdx_log_flush_desc()
461 count = desc->zero_length / VHDX_LOG_SECTOR_SIZE; in vhdx_log_flush_desc()
473 ret = bdrv_pwrite_sync(bs->file, file_offset, VHDX_LOG_SECTOR_SIZE, in vhdx_log_flush_desc()
478 file_offset += VHDX_LOG_SECTOR_SIZE; in vhdx_log_flush_desc()
504 data = qemu_blockalign(bs, VHDX_LOG_SECTOR_SIZE); in vhdx_log_flush()
623 total_sectors = hdr.entry_length / VHDX_LOG_SECTOR_SIZE; in vhdx_validate_log_entry()
633 desc_sectors * VHDX_LOG_SECTOR_SIZE, 4); in vhdx_validate_log_entry()
636 buffer = qemu_blockalign(bs, VHDX_LOG_SECTOR_SIZE); in vhdx_validate_log_entry()
645 crc = vhdx_checksum_calc(crc, buffer, VHDX_LOG_SECTOR_SIZE, -1); in vhdx_validate_log_entry()
911 sector_offset = offset % VHDX_LOG_SECTOR_SIZE; in vhdx_log_write()
912 file_offset = QEMU_ALIGN_DOWN(offset, VHDX_LOG_SECTOR_SIZE); in vhdx_log_write()
918 leading_length = (VHDX_LOG_SECTOR_SIZE - sector_offset); in vhdx_log_write()
924 sectors = aligned_length / VHDX_LOG_SECTOR_SIZE; in vhdx_log_write()
925 trailing_length = aligned_length - (sectors * VHDX_LOG_SECTOR_SIZE); in vhdx_log_write()
955 total_length = (desc_sectors + sectors) * VHDX_LOG_SECTOR_SIZE; in vhdx_log_write()
964 data_sector = buffer + (desc_sectors * VHDX_LOG_SECTOR_SIZE); in vhdx_log_write()
970 merged_sector = qemu_blockalign(bs, VHDX_LOG_SECTOR_SIZE); in vhdx_log_write()
979 ret = bdrv_co_pread(bs->file, file_offset, VHDX_LOG_SECTOR_SIZE, in vhdx_log_write()
990 VHDX_LOG_SECTOR_SIZE - trailing_length, in vhdx_log_write()
999 bytes_written = VHDX_LOG_SECTOR_SIZE; in vhdx_log_write()
1012 file_offset += VHDX_LOG_SECTOR_SIZE; in vhdx_log_write()