blockdev: abort transactions in reverse order
commitf4de0f8c40b70c4c9308b4670e0a6ad9faed0262
authorJohn Snow <jsnow@redhat.com>
Fri, 11 Jan 2019 17:59:16 +0000 (11 11:59 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 14 Jan 2019 16:08:47 +0000 (14 10:08 -0600)
tree5cd6f77de676bcce66818feaaf95c11376ddaa3e
parent7260438b7056469610ee166f7abe9ff8a26b8b16
blockdev: abort transactions in reverse order

Presently, we abort transactions in the same order they were processed in.
Bitmap commands, though, attempt to restore backup data structures on abort.

That's not valid, they need to be aborted in reverse chronological order.

Replace the QSIMPLEQ data structure with a QTAILQ one, so we can iterate
in reverse for the abort phase of the transaction.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20181221093529.23855-2-jsnow@redhat.com>
[eblake: rebase]
Signed-off-by: Eric Blake <eblake@redhat.com>
blockdev.c