bug#52516: Avoiding race condition between partprobe and getting PARTUUID using lsblk?

2021-12-15 Thread Brian C. Lane
On Wed, Dec 15, 2021 at 01:12:43PM +, Anton Hvornum wrote: [snip] > My question boils down to: > 1. Is there a way to get an indication of when the partprobe (or > kernel) has completed its task of populating the partition > information? udevadm settle should help. The problem is that partp

bug#52516: Avoiding race condition between partprobe and getting PARTUUID using lsblk?

2021-12-15 Thread Anton Hvornum
Hi. So I've been struggling a bit with optimizing applications calling partprobe right after lsblk to retrieve PARTUUID of newly generated partitions using parted. Assuming the following loop: * partprobe * lsblk * if !result: sleep + loop It feels as if every partprobe (indirectly or directly)