mount -u removes "noatime"

From: Jamie Landeg-Jones <jamie_at_catflap.org>
Date: Mon, 02 Sep 2024 01:39:24 UTC
I noticed some of my noatime mounts keep being reset to atime. Looking
further, I found out the culprit was a snapshotting program running:

mount -u -o snapshot <path> <fs>

It turns out, that just using -u causes noatime to be dropped:

 | root@catflap# mount -v | grep da0p3
 | /dev/da0p3 on / (ufs, local, noatime, writes: sync 3343750 async 2795680, reads: sync 204356 async 10254, fsid 1fa69665dd23d4e8, vnodes: count 3803 )

 | root@catflap# mount -u /
 | /dev/da0p3 on / (ufs, local, writes: sync 3343750 async 2795680, reads: sync 204356 async 10254, fsid 1fa69665dd23d4e8, vnodes: count 3803 )

I assume this shouldn't be the case?

Incidentally, is there any difference between "mksnap_ffs" and "mount -u -o snapshot..."? (other that the noatime mangling)

Finally, man mount(8) has:

| Note that the schg flag is set on snapshots to ensure that not even the root
| user can write to them. The unlink command makes an exception for snapshot
| files in that it allows them to be removed even though they have the schg
| flag set, so it is not necessary to clear the schg flag before removing a
| snapshot file.

The schg flag isn't set on snapshots, at least according to ls -lo

Cheers, Jamie