Subject: kern/15555: nullfs slow to flush
To: None <gnats-bugs@gnats.netbsd.org>
From: None <kalt@taranis.org>
List: netbsd-bugs
Date: 02/09/2002 17:49:21
>Number: 15555
>Category: kern
>Synopsis: nullfs is slow to flush certain changes
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Feb 09 14:50:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Christophe Kalt
>Release: 1.5.1, kernel may be a little more recent
>Organization:
>Environment:
System: NetBSD zh.taranis.org 1.5.1 NetBSD 1.5.1 (XPSH) #1: Sat Jul 7 15:27:33 EDT 2001 root@zh.taranis.org:/usr/src/sys/arch/i386/compile/XPSH i386
>Description:
when deleting files, space is not reclaimed as quickly as it should.
i've noticed it times and times again when filling up a partition,
trying to free up space by deleting files only to find that i have
to wait *minutes* (5, 10 sometimes) to be able to get space freed.
i'm including below an example using mfs as the underlying filesystem,
not that i believe it to matter.
anyhow, you will notice that unmounting the nullfs will force things.
>How-To-Repeat:
# mount -t mfs -o rw,-s1024 swap /mnt
# mkdir /mnt2
# mount -t null /mnt /mnt2
# df -k /mnt /mnt2
Filesystem 1K-blocks Used Avail Capacity Mounted on
mfs:655 463 1 438 0% /mnt
/mnt 463 1 438 0% /mnt2
# cat /dev/zero > /mnt2/oink
/mnt: write failed, file system is full
cat: stdout: No space left on device
# df -k /mnt /mnt2
Filesystem 1K-blocks Used Avail Capacity Mounted on
mfs:655 463 449 -10 102% /mnt
/mnt 463 449 -10 102% /mnt2
# date
Sat Feb 9 17:30:14 EST 2002
# ls -l /mnt /mnt2
/mnt:
/mnt2:
# sync;sync;sync;sync
# df -k /mnt /mnt2
Filesystem 1K-blocks Used Avail Capacity Mounted on
mfs:655 463 449 -10 102% /mnt
/mnt 463 449 -10 102% /mnt2
# date; df -k /mnt /mnt2
Sat Feb 9 17:33:24 EST 2002
Filesystem 1K-blocks Used Avail Capacity Mounted on
mfs:655 463 449 -10 102% /mnt
/mnt 463 449 -10 102% /mnt2
# umount /mnt2
# df -k /mnt
Filesystem 1K-blocks Used Avail Capacity Mounted on
mfs:655 463 1 438 0% /mnt
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: