[parted-devel] [PATCH] libparted: Use flock to lock access to the device

Phil Susi psusi at ubuntu.com
Mon Sep 21 19:45:39 UTC 2015


On 8/11/2015 4:49 PM, Brian C. Lane wrote:
> It is possible for other processes, espceially udev, to try and access
> the device while parted is examining it or making changes. This tries to
> get an exclusive lock on the device when it is opened for RW access. If
> it fails it prints a warning and continues on.

How about delaying and retrying the lock say, every 10ms for up to
1000ms first?





More information about the parted-devel mailing list