Ameer Hamza
cb2e2f9c4f
libzfs: use mount_setattr for selective remount including legacy mounts
...
When a namespace property is changed via zfs set, libzfs remounts the
filesystem to propagate the new VFS mount flags. The current approach
uses mount(2) with MS_REMOUNT, which reads all namespace properties
from ZFS and applies them together. This has two problems:
1. Linux VFS resets unspecified per-mount flags on remount. If an
administrator sets a temporary flag (e.g. mount -o remount,noatime),
a subsequent zfs set on any namespace property clobbers it.
2. Two concurrent zfs set operations on different namespace properties
can overwrite each other's mount flags.
Additionally, legacy datasets (mountpoint=legacy) were never remounted
on namespace property changes since zfs_is_mountable() returns false
for them.
Add zfs_mount_setattr() which uses mount_setattr(2) to selectively
update only the mount flags that correspond to the changed property.
For legacy datasets, /proc/mounts is iterated to update all
mountpoints. On kernels without mount_setattr (ENOSYS), non-legacy
datasets fall back to a full remount; legacy mounts are skipped to
avoid clobbering temporary flags.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov >
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com >
Signed-off-by: Ameer Hamza <ahamza@ixsystems.com >
Closes #18257
2026-04-23 14:33:23 -07:00
..
2018-05-29 14:51:39 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2025-03-13 17:57:12 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2020-07-10 14:26:12 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:31:09 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:31:04 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:30:53 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:31:33 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:31:33 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:33:00 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:33:23 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:29:46 -07:00
2026-04-23 14:33:23 -07:00
2026-04-23 14:33:00 -07:00
2026-04-23 14:29:46 -07:00