From owner-freebsd-current@FreeBSD.ORG Fri Jun 17 15:53:08 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA3611065670 for ; Fri, 17 Jun 2011 15:53:08 +0000 (UTC) (envelope-from hans@beastielabs.net) Received: from mail.beastielabs.net (beasties.demon.nl [82.161.3.114]) by mx1.freebsd.org (Postfix) with ESMTP id 589298FC1F for ; Fri, 17 Jun 2011 15:53:07 +0000 (UTC) Received: from testsoekris.hotsoft.nl (localhost [127.0.0.1]) by mail.beastielabs.net (8.14.4/8.14.4) with ESMTP id p5HFYFxm092875 for ; Fri, 17 Jun 2011 17:34:15 +0200 (CEST) (envelope-from hans@testsoekris.hotsoft.nl) Received: (from hans@localhost) by testsoekris.hotsoft.nl (8.14.4/8.14.4/Submit) id p5HFYFPC092874 for freebsd-current@freebsd.org; Fri, 17 Jun 2011 17:34:15 +0200 (CEST) (envelope-from hans) Date: Fri, 17 Jun 2011 17:34:15 +0200 From: Hans Ottevanger To: freebsd-current@freebsd.org Message-ID: <20110617153415.GA92803@testsoekris.hotsoft.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Subject: SU+J: negative used diskspace (for a while) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2011 15:53:09 -0000 Hi, I found a possible issue with SU+J on recent versions of -CURRENT. After deleting a large file hierarchy (copy of /usr/src, ~1.5 Gbyte), df reports a negative number of blocks "Used" for a while. I am using a GENERIC kernel (r223184) on an amd64 platform. The hardware is relatively simple: Intel DP965LT mainboard with a Q6600 CPU, 8 Gbyte RAM and two Samsung 501LJ 500 Gbyte SATA disks. The issue can be demonstrated by copying /usr/src to the current directory (cp -R /usr/src .) and running the following script to delete the copy and print the free space at 10 second intervals: #!/bin/sh df . time rm -rf src echo 'src is gone ...' while true do df . | tail -1 sleep 10 done This yields the following output: Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/ada0s1g 416144900 1612066 381241242 0% /home 51.21 real 1.00 user 17.38 sys src is gone ... /dev/ada0s1g 416144900 -164692 383018000 -0% /home /dev/ada0s1g 416144900 -165082 383018390 -0% /home /dev/ada0s1g 416144900 -246852 383100160 -0% /home /dev/ada0s1g 416144900 -246852 383100160 -0% /home /dev/ada0s1g 416144900 -246852 383100160 -0% /home /dev/ada0s1g 416144900 -64146 382917454 -0% /home /dev/ada0s1g 416144900 -64146 382917454 -0% /home /dev/ada0s1g 416144900 -64146 382917454 -0% /home /dev/ada0s1g 416144900 32910 382820398 0% /home /dev/ada0s1g 416144900 32910 382820398 0% /home So it takes more than a minute before the disk space is back to "normal" values. After disabling journaling (tunefs -j disable) I get the following output: Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/ada0s1g 416144900 1579284 381274024 0% /home 35.40 real 0.96 user 13.32 sys src is gone ... /dev/ada0s1g 416144900 128 382853180 0% /home /dev/ada0s1g 416144900 128 382853180 0% /home /dev/ada0s1g 416144900 128 382853180 0% /home /dev/ada0s1g 416144900 128 382853180 0% /home which is as it should be. The problem also does not occur with journaling enabled when I revert to r222723. Is anybody else seeing these weird phenomena? Could this be related to the recent changes to UFS? Kind regards, Hans Ottevanger