On Di, 19.11.24 01:45, Nils Kattenbeck (nilskemail@xxxxxxxxx) wrote: > On Tue, Nov 19, 2024 at 1:00 AM Lennart Poettering > <lennart@xxxxxxxxxxxxxx> wrote: > > > > On Do, 14.11.24 14:25, Phillip Susi (phill@xxxxxxxxxxxx) wrote: > > > > > Lennart Poettering <lennart@xxxxxxxxxxxxxx> writes: > > > > > > > the BLKFLSBUF ioctl() works fine on block device fds open for read only. > > > > > > Oh, I might have to change that to use a read only open then. > > > > > > > I am not following anymore. As *long* *as* *the* lock is taken the > > > > auto mounting doesn't happen. Once you release the lock then > > > > everything will be reprobed and work as it always worked, including > > > > auto-mounting. > > > > > > It is not about delaying the auto mounting, but *preventing it* > > > entirely. > > > > It *is* prevented. While you keep the lock open *no* events are > > propagated from udev to its clients, hence no automounts will take > > place. Any kernel reported event that happen while you keep the lock > > will basically be eaten up by udev and not propagated on to rest of > > userspace. They are sent to /dev/null if you so will. When you release > > the lock once you are fully done (which might as well be 3h later, if > > you like) however, then a single *new* event is *synthesized*, to get > > the rest of userspace updated again on things. And yes, that *might* > > cause userspace to automount things, and other stuff. But that's fine, > > you explicit indicated you are now done with the device, hence others > > can consume it again. > > I think you have been talking past each other for the last dozen mails. > I am quite sure that Philip Susi not only wants to prevent auto-mounts > while gparted is working with the filesystem but also afterwards, > i.e. they also want to suppress the synthetic event you are talking > about. Huh? Even after? Like, *forever*??? What's the point of that? Is gparted supposed to break your system for good and render your block devices unusable? I thought it was a partitioner, but I might have gotten that wrong? Lennart -- Lennart Poettering, Berlin