summaryrefslogtreecommitdiffstats
path: root/src/portable
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@microsoft.com>2021-07-20 16:26:56 +0200
committerLuca Boccassi <luca.boccassi@microsoft.com>2021-07-28 21:07:01 +0200
commita36429971ad46af5b29d3dafba1adc596e5aaa60 (patch)
tree21fa6ac086e6188abe53748ed0d04bf0f9384999 /src/portable
parentloop: parse and store disk sequence number (diff)
downloadsystemd-a36429971ad46af5b29d3dafba1adc596e5aaa60.tar.xz
systemd-a36429971ad46af5b29d3dafba1adc596e5aaa60.zip
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.
Diffstat (limited to 'src/portable')
-rw-r--r--src/portable/portable.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/portable/portable.c b/src/portable/portable.c
index 5afb008bb8..899a74073d 100644
--- a/src/portable/portable.c
+++ b/src/portable/portable.c
@@ -393,6 +393,7 @@ static int portable_extract_by_path(
r = dissect_image(
d->fd,
NULL, NULL,
+ d->diskseq,
d->uevent_seqnum_not_before,
d->timestamp_not_before,
DISSECT_IMAGE_READ_ONLY |