[parted-devel] [PATCH V2 1/2] arch: Fix race between systemd and parted command

Gulam Mohamed gulam.mohamed at oracle.com
Tue Apr 8 19:12:05 BST 2025


> -----Original Message-----
> From: Phillip Susi <phill at thesusis.net>
> Sent: Tuesday, April 8, 2025 6:31 PM
> To: Gulam Mohamed <gulam.mohamed at oracle.com>; parted-devel at alioth-
> lists.debian.net
> Subject: Re: [parted-devel] [PATCH V2 1/2] arch: Fix race between systemd
> and parted command
> 
> Gulam Mohamed <gulam.mohamed at oracle.com> writes:
> 
> > Gentle reminder for code review for V2 of this patch sent on "Wed, 22 Jan
> 2025 01:37:29 -0800<https://urldefense.com/v3/__https://www.mail-
> archive.com/search?l=parted-devel at alioth-
> lists.debian.net&q=date:20250122__;!!ACWV5N9M2RV99hQ!I60K4p_gfGQFV
> gLsaDtDlKKYU-
> Bz0BxWtSwtS2J7aqbObUw9Sx8vGANwAmt6Kj7XFdl1YrK9SYs6jgVr3Q$ >".
> >
> > Regards,
> > Gulam Mohamed.
> 
> Why is systemd deleting and recreating the partitions?  It shouldn't be doing
> that should it?  And isn't this a bit of a hacky workaround to the race
> condition rather than actually fixing it?  Maybe parted needs to take out the
> bsd lock to tell systemd to keep its hands off of the disk until parted is done
> with it?

Thanks for the review Phillip. This approach was suggested by Brian C. Lane. Can you please see conversation of the first version of this fix here:
https://www.mail-archive.com/parted-devel@alioth-lists.debian.net/msg00660.html

After Brian's suggestions, I worked on this version V2.

Regards,
Gulam Mohamed.




More information about the parted-devel mailing list