Re: /c: unmount pending error: blocks -68512 files 0

From: Chuck Swiger <cswiger_at_mac.com>
Date: Fri, 27 Jan 2006 19:50:18 -0500
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
Received on Fri Jan 27 2006 - 23:50:18 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:51 UTC