diff options
author | Luca Boccassi <luca.boccassi@microsoft.com> | 2021-07-20 15:26:56 +0100 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@microsoft.com> | 2021-07-28 20:07:01 +0100 |
commit | a36429971ad46af5b29d3dafba1adc596e5aaa60 (patch) | |
tree | 21fa6ac086e6188abe53748ed0d04bf0f9384999 /src/gpt-auto-generator | |
parent | bcef1743a5e9e972df6c38e0b263bbd9de7fac44 (diff) | |
download | systemd-a36429971ad46af5b29d3dafba1adc596e5aaa60.tar.gz |
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/gpt-auto-generator')
-rw-r--r-- | src/gpt-auto-generator/gpt-auto-generator.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c index f5346f49ad..4d0364fcee 100644 --- a/src/gpt-auto-generator/gpt-auto-generator.c +++ b/src/gpt-auto-generator/gpt-auto-generator.c @@ -699,6 +699,7 @@ static int enumerate_partitions(dev_t devnum) { r = dissect_image( fd, NULL, NULL, + /* diskseq= */ 0, UINT64_MAX, USEC_INFINITY, DISSECT_IMAGE_GPT_ONLY| |