On Thu 07-09-23 14:04:51, Mikulas Patocka wrote:
Well, e.g. e2fsprogs use O_EXCL open so they will detect that the filesystem
On Thu, 7 Sep 2023, Christian Brauner wrote:
I think it's an issue if the administrator writes a script that unmounts aI think we've got too deep down into "how to fix things" but I'm not 100%We did.
sure what the "bug" actually is. In the initial posting Mikulas writes "the
kernel writes to the filesystem after unmount successfully returned" - is
that really such a big issue?
filesystem and then copies the underyling block device somewhere. Or a
script that unmounts a filesystem and runs fsck afterwards. Or a script
that unmounts a filesystem and runs mkfs on the same block device.
hasn't been unmounted properly and complain. Which is exactly what should
IMHO happen.
What I wanted to suggest is that we should provide means how to make sureIt's admin's responsibility to make sure that the filesystem is notAnybody else can open the device and write to it as well. Or even
mount the device again. So userspace that relies on this is kind of
flaky anyway (and always has been).
mounted multiple times when he touches the underlying block device after
unmount.
block device is not being modified and educate admins and tool authors
about them. Because just doing "umount /dev/sda1" and thinking this means
that /dev/sda1 is unused now simply is not enough in today's world for
multiple reasons and we cannot solve it just in the kernel.