Stefan Hajnoczi b404bf8542 dmg: drop broken bdrv_pread() loop
It is not necessary to check errno for EINTR and the block layer does
not produce short reads.  Therefore we can drop the loop that attempts
to read a compressed chunk.

The loop is buggy because it incorrectly adds the transferred bytes
twice:

  do {
      ret = bdrv_pread(...);
      i += ret;
  } while (ret >= 0 && ret + i < s->lengths[chunk]);

Luckily we can drop the loop completely and perform a single
bdrv_pread().

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-04-01 15:22:35 +02:00
..
2014-04-01 13:59:47 +02:00
2014-04-01 15:22:35 +02:00
2014-03-25 14:09:50 +01:00
2014-03-19 09:39:41 +01:00
2014-03-25 14:09:50 +01:00
2014-03-25 14:09:50 +01:00
2014-03-25 14:09:50 +01:00
2014-04-01 13:59:47 +02:00