diff options
| author | Liu Yuan | 2013-12-13 18:29:28 +0100 |
|---|---|---|
| committer | Stefan Hajnoczi | 2013-12-20 09:11:57 +0100 |
| commit | e50d7607f1800c9f9c576229c6119e4c82f456d6 (patch) | |
| tree | 0e1971bd2eefccd6e372a6f7d8db12961e9790fb /scripts/checkpatch.pl | |
| parent | Merge remote-tracking branch 'agraf/tags/signed-ppc-for-upstream' into staging (diff) | |
| download | qemu-e50d7607f1800c9f9c576229c6119e4c82f456d6.tar.gz qemu-e50d7607f1800c9f9c576229c6119e4c82f456d6.tar.xz qemu-e50d7607f1800c9f9c576229c6119e4c82f456d6.zip | |
sheepdog: fix dynamic grow for running qcow2 format
When running qcow2 over sheepdog, we might meet following problem
qemu-system-x86_64: shrinking is not supported
And cause IO errors to Guest. This is because we abuse bs->total_sectors, which
is manipulated by generic block layer and race with sheepdog code.
We should directly check if offset > vdi_size to dynamically enlarge the volume
instead of 'offset > bs->total_sectors', which will cause problem when following
case happens:
vdi_size > offset > bs->total_sectors
# then trigger sd_truncate() to shrink the volume wrongly.
Cc: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Reported-by: Hadrien KOHL <hadrien.kohl@gmail.com>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'scripts/checkpatch.pl')
0 files changed, 0 insertions, 0 deletions
