Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Jun 2002 14:31:02 -0700
From:      Kirk McKusick <mckusick@beastie.mckusick.com>
To:        freebsd-current@FreeBSD.ORG
Cc:        Munehiro Matsuda <haro@h4.dion.ne.jp>, Poul-Henning Kamp <phk@critter.freebsd.dk>, Maxime Henrion <mux@FreeBSD.ORG>
Subject:   Re: UFS2 related message?
Message-ID:  <200206222131.g5MLV2n9024735@beastie.mckusick.com>

next in thread | raw e-mail | index | archive | help
The problem with running out of inodes is now fixed and checked in
on freefall. You need to pick up /sys/ufs/ffs/ffs_alloc.c revision
1.94 or later. For those that care, the log entry describing the
problem:

----------------------------
revision 1.94
date: 2002/06/22 21:24:58;  author: mckusick;  state: Exp;  lines: +2 -2
This patch fixes a problem whereby filesystems that ran
out of inodes in a cylinder group would fail to check for
free inodes in other cylinder groups. This bug was introduced
in the UFS2 code merge two days ago.

An inode is allocated by calling ffs_valloc which calls
ffs_hashalloc to do the filesystem scan. Ffs_hashalloc
walks around the cylinder groups calling its passed allocator
(ffs_nodealloccg in this case) until the allocator returns a
non-zero result. The bug is that ffs_hashalloc expects the
passed allocator function to return a 64-bit ufs2_daddr_t.
When allocating inodes, it calls ffs_nodealloccg which was
returning a 32-bit ino_t. The ffs_hashalloc code checked
a 64-bit return value and usually found random non-zero bits in
the high 32-bits so decided that the allocation had succeeded
(in this case in the only cylinder group that it checked).
When the result was passed back to ffs_valloc it looked at
only the bottom 32-bits, saw zero and declared the system
out of inodes. But ffs_hashalloc had really only checked
one cylinder group.

The fix is to change ffs_nodealloccg to return 64-bit results.

Sponsored by:   DARPA & NAI Labs.
Submitted by:   Poul-Henning Kamp <phk@critter.freebsd.dk>
Reviewed by:    Maxime Henrion <mux@freebsd.org>
----------------------------

	Kirk McKusick

=-=-=-=-=-=

To: freebsd-current@FreeBSD.ORG
Subject: UFS2 related message?
Date: Sat, 22 Jun 2002 20:45:01 +0900
From: Munehiro Matsuda <haro@h4.dion.ne.jp>

Hello all,

After the import of UFS2 patch into -current, I get the following messages.

pid 397 (perl), uid 123 inumber 682496 on /home: out of inodes
pid 397 (perl), uid 123 inumber 682496 on /home: out of inodes
pid 397 (perl), uid 123 inumber 682496 on /home: out of inodes

Is it related to UFS2 by anyway?

FYI, here's what got with my disks.

% df -i
Filesystem  1K-blocks    Used   Avail Capacity iused   ifree %iused  Mounted on
/dev/ad0s2a    254063   91341  142397    39%    2615   60871    4%   /
devfs               1       1       0   100%       0       0  100%   /dev
/dev/ad0s3e   7185161 4473874 2136475    68%  227116 1574354   13%   /home
/dev/ad0s2f   2787666 1668475  896178    65%  176288  522078   25%   /usr
/dev/ad0s2e    254063   10456  223282     4%    1653   61833    3%   /var
procfs              4       4       0   100%       1       0  100%   /proc
linprocfs           4       4       0   100%       1       0  100%   /usr/compat/linux/proc
/dev/ad0s1    3663652 2542176 1121476    69%       0       0  100%   /dos
%

Thanks in advance,
  Haro
=------------------------------------------------------------------------------
           _ _    Munehiro (haro) Matsuda
 -|- /_\  |_|_|   Business Incubation Dept., Kubota Corp.
 /|\ |_|  |_|_|   1-3 Nihonbashi-Muromachi 3-Chome
                  Chuo-ku Tokyo 103-8310, Japan
                  Tel: +81-3-3245-3318  Fax: +81-3-3245-3315
                  Email: haro@kubota.co.jp

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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