Re: Masking mount units

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 31, 2024 at 10:23 AM Lennart Poettering
<lennart@xxxxxxxxxxxxxx> wrote:
>
> On Do, 31.10.24 09:03, Phillip Susi (phill@xxxxxxxxxxxx) wrote:
>
> > Lennart Poettering <lennart@xxxxxxxxxxxxxx> writes:
> >
> > Yes, but then it reads the disk and auto mounts a partition just because
> > someone ran parted print.  Printing the partition table should not
> > trigger auto mount.
>
> NO!
>
> I don't know parted, but why would it open device for *WRITE* if it
> only wants to show contents of it? It should open it for *READ* then,
> and thus not trigger any events.

I'm reading between the lines a bit, but my guess is that libparted
always opens the device writable in case you start issuing actual
partitioning commands. To support "parted print doesn't trigger udev
events", I think you'd have to change libparted so that it opens the
device for read first (potentially with a shared lock) and then
reopens it for write (with an exclusive lock) when needed (e.g. when
using the mkpart command in the interactive session). Without that, I
think you're always going to need workarounds such as masking mount
units.

---
Dan




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux