mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
ide: fix TRIM with empty range entry
ATA-ACS-3 says "If the two byte range length is zero, then the LBA Range Entry shall be discarded as padding." iovecs are used as if they are linearized, so it is incorrect to discard the rest of this iovec. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
8238010b26
commit
80bc2e8d80
1 changed files with 1 additions and 1 deletions
|
@ -374,7 +374,7 @@ BlockDriverAIOCB *ide_issue_trim(BlockDriverState *bs,
|
|||
uint16_t count = entry >> 48;
|
||||
|
||||
if (count == 0) {
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
|
||||
ret = bdrv_discard(bs, sector, count);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue