aboutsummaryrefslogtreecommitdiff
path: root/ui/curses.c
diff options
context:
space:
mode:
authorAlberto Garcia <berto@igalia.com>2020-07-10 18:13:05 +0200
committerMax Reitz <mreitz@redhat.com>2020-08-25 08:33:20 +0200
commita68cd70326e8a1ee710d420c64693c741403897c (patch)
treecf3a54395e4a0f13d90d367ec8354fa01a2ac23e /ui/curses.c
parent205fa507508e1f8caa79325bafb3cd2ae8814125 (diff)
qcow2: Add subcluster support to discard_in_l2_slice()
Two things need to be taken into account here: 1) With full_discard == true the L2 entry must be cleared completely. This also includes the L2 bitmap if the image has extended L2 entries. 2) With full_discard == false we have to make the discarded cluster read back as zeroes. With normal L2 entries this is done with the QCOW_OFLAG_ZERO bit, whereas with extended L2 entries this is done with the individual 'all zeroes' bits for each subcluster. Note however that QCOW_OFLAG_ZERO is not supported in v2 qcow2 images so, if there is a backing file, discard cannot guarantee that the image will read back as zeroes. If this is important for the caller it should forbid it as qcow2_co_pdiscard() does (see 80f5c01183 for more details). Signed-off-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-Id: <5ef8274e628aa3ab559bfac467abf488534f2b76.1594396418.git.berto@igalia.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'ui/curses.c')
0 files changed, 0 insertions, 0 deletions