On Tue, 13 May 2025 19:39:33 +0200,
Visa Hankala <[email protected]> wrote:
>
> On Tue, May 13, 2025 at 03:15:21PM +0200, Kirill A. Korinsky wrote:
> > Just tested an idea from
> > https://marc.info/?l=openbsd-misc&m=170525185806712&w=2
> >
> > The test was:
> >  1. Install a new kernel with inlined diff.
> >  2. Reboot device.
> >  3. Confirm that date is accurate.
> >  4. Disable ntpd.
> >  5. Reboot device again.
> >

Well, after some rest I've realised that I had tested the wrong things.

So, I jsut re-test the result of arch/octeon/stand instead of GENERIC.MP,
and original hack works as expected.

>
> I think the boot kernel should skip just the mount timestamp update.
> However, this should not be tied to BOOT_QUIET in case someone wants
> to enable boot kernel printouts for debugging.
>
> The powerpc64 boot kernel probably does not need this but maybe it
> should behave in the same way nevertheless.
>

Anyway, this diff isn't a hack and it is confirmed to work.

FWIW: tested and OK kirill@

> Index: arch/octeon/conf/BOOT
> ===================================================================
> RCS file: src/sys/arch/octeon/conf/BOOT,v
> diff -u -p -r1.13 BOOT
> --- arch/octeon/conf/BOOT     11 Jan 2023 03:28:42 -0000      1.13
> +++ arch/octeon/conf/BOOT     13 May 2025 17:21:02 -0000
> @@ -3,6 +3,7 @@
>  machine              octeon mips64
>  maxusers     4
>
> +option               BOOT_KERNEL
>  option               BOOT_QUIET
>
>  option               SMALL_KERNEL
> Index: arch/powerpc64/conf/BOOT
> ===================================================================
> RCS file: src/sys/arch/powerpc64/conf/BOOT,v
> diff -u -p -r1.9 BOOT
> --- arch/powerpc64/conf/BOOT  8 Jan 2022 05:40:19 -0000       1.9
> +++ arch/powerpc64/conf/BOOT  13 May 2025 17:21:02 -0000
> @@ -3,6 +3,7 @@
>  machine              powerpc64
>  maxusers     4
>
> +option               BOOT_KERNEL
>  option               BOOT_QUIET
>
>  option               SMALL_KERNEL
> Index: ufs/ffs/ffs_vfsops.c
> ===================================================================
> RCS file: src/sys/ufs/ffs/ffs_vfsops.c,v
> diff -u -p -r1.198 ffs_vfsops.c
> --- ufs/ffs/ffs_vfsops.c      3 Feb 2024 18:51:58 -0000       1.198
> +++ ufs/ffs/ffs_vfsops.c      13 May 2025 17:21:02 -0000
> @@ -1394,7 +1394,9 @@ ffs_sbupdate(struct ufsmount *mp, int wa
>           fs->fs_sblockloc >> (fs->fs_fshift - fs->fs_fsbtodb),
>           (int)fs->fs_sbsize, 0, INFSLP);
>       fs->fs_fmod = 0;
> +#ifndef BOOT_KERNEL
>       fs->fs_time = gettime();
> +#endif
>       memcpy(bp->b_data, fs, fs->fs_sbsize);
>       /* Restore compatibility to old file systems.              XXX */
>       dfs = (struct fs *)bp->b_data;                          /* XXX */
>

--
wbr, Kirill

Reply via email to