Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jan 2006 19:50:18 -0500
From:      Chuck Swiger <cswiger@mac.com>
To:        Kris Kennaway <kris@obsecurity.org>
Cc:        current@FreeBSD.org
Subject:   Re: /c: unmount pending error: blocks -68512 files 0
Message-ID:  <43DABFCA.5030509@mac.com>
In-Reply-To: <20060128000909.GA69458@xor.obsecurity.org>
References:  <20060128000909.GA69458@xor.obsecurity.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Kris Kennaway wrote:
> /c: unmount pending error: blocks -68512 files 0   
> 
> This warning has been popping up sporadically on my systems at reboot
> time since FreeBSD 5.3..what causes it?

Did you have any processes stuck in an uninterruptable condition when you
unmounted the filesystem?  The message is from:

> % find /usr/src/sys -name *.c -print0 | xargs -0 grep -n 'unmount pending error:'
/usr/src/sys/ufs/ffs/ffs_vfsops.c:961:

        if (fs->fs_pendingblocks != 0 || fs->fs_pendinginodes != 0) {
                printf("%s: unmount pending error: blocks %jd files %d\n",
                    fs->fs_fsmnt, (intmax_t)fs->fs_pendingblocks,
                    fs->fs_pendinginodes);
                fs->fs_pendingblocks = 0;
                fs->fs_pendinginodes = 0;
        }

A quick look there suggests that ffs_unmount() tries to call
softdep_flushfiles() or ffs_flushfiles().  Apparently, if those fail to flush
all pending data, the error message you've seen is generated.

The printf() statement should be using an unsigned int format string rather than
claiming a negative number of blocks is affected, or perhaps
fs->fs_pendingblocks ought to be an u_int64_t...?

-- 
-Chuck



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43DABFCA.5030509>