tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

FSCK_EXIT_ROOT_CHANGED



Hi,

with a -current userland/kernel every time that fsck_ffs checks
the root filesystem it returns FSCK_EXIT_ROOT_CHANGED, and
/etc/rc.d/fsck checks the exit code and executes a reboot(2) call.

That's because the mount(2) call is returning -1 (fsck_ffs/main.c):

        if (hotroot()) {
                struct statvfs stfs_buf;
                /*
                 * We modified the root.  Do a mount update on
                 * it, unless it is read-write, so we can continue.
                 */
                if (statvfs("/", &stfs_buf) == 0) {
                        long flags = stfs_buf.f_flag;
                        struct ufs_args args;

                        if (flags & MNT_RDONLY) {
                                args.fspec = 0;
                                flags |= MNT_UPDATE | MNT_RELOAD;
                                if (mount(MOUNT_FFS, "/", flags,
                                    &args, sizeof args) == 0)
                                        return FSCK_EXIT_OK;
                        }
                }
                if (!preen)
                        pwarn("\n***** REBOOT NOW *****\n");
                sync();
                return FSCK_EXIT_ROOT_CHANGED;
        }

Dunno why mount returns -1, but this is causing an extra reboot
every time the root filesystem is fsck'ed... any idea where's
the problem?

-- 
Juan Romero Pardines
xtraeme at gmail|netbsd dot org
The NetBSD Project


Home | Main Index | Thread Index | Old Index