From a36429971ad46af5b29d3dafba1adc596e5aaa60 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Tue, 20 Jul 2021 15:26:56 +0100 Subject: dissect: use DISKSEQ when waiting for block devices DISKSEQ is a reliable way to find out if we missed a uevent or not, as it's monotonically increasing. If we parse an event with a smaller or no sequence number, we know we need to wait longer. If we parse an event with a greater sequence number, we know we missed it and the device was reused. --- src/shared/discover-image.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/shared/discover-image.c') diff --git a/src/shared/discover-image.c b/src/shared/discover-image.c index 521264ec29..1711dd647a 100644 --- a/src/shared/discover-image.c +++ b/src/shared/discover-image.c @@ -1203,6 +1203,7 @@ int image_read_metadata(Image *i) { r = dissect_image( d->fd, NULL, NULL, + d->diskseq, d->uevent_seqnum_not_before, d->timestamp_not_before, DISSECT_IMAGE_GENERIC_ROOT | -- cgit v1.2.1