Your message dated Wed, 11 May 2005 10:48:09 +0900 with message-id <[EMAIL PROTECTED]> and subject line statfs returns wrong values for 250Gb FAT fs has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what I am talking about this indicates a serious mail system misconfiguration somewhere. Please contact me immediately.) Debian bug tracking system administrator (administrator, Debian Bugs database) -------------------------------------- Received: (at submit) by bugs.debian.org; 7 May 2005 17:25:03 +0000 >From [EMAIL PROTECTED] Sat May 07 10:25:03 2005 Return-path: <[EMAIL PROTECTED]> Received: from relay1.ptmail.sapo.pt (sapo.pt) [212.55.154.21] by spohr.debian.org with smtp (Exim 3.35 1 (Debian)) id 1DUT31-0004gO-00; Sat, 07 May 2005 10:25:03 -0700 Received: (qmail 9949 invoked from network); 7 May 2005 17:24:30 -0000 Received: from unknown (HELO sapo.pt) (10.134.35.158) by relay1 with SMTP; 7 May 2005 17:24:30 -0000 Received: (qmail 6497 invoked from network); 7 May 2005 17:24:30 -0000 X-AntiVirus: PTMail-AV 0.3.83 Received: from unknown (HELO localhost.localdomain) ([82.154.12.106]) (envelope-sender <[EMAIL PROTECTED]>) by mta8 (qmail-ldap-1.03) with SMTP for <[EMAIL PROTECTED]>; 7 May 2005 17:24:30 -0000 Received: from carlos by localhost.localdomain with local (Exim 4.50) id 1DUT2T-0000fm-Nx for [EMAIL PROTECTED]; Sat, 07 May 2005 18:24:29 +0100 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Carlos Rodrigues <[EMAIL PROTECTED]> To: Debian Bug Tracking System <[EMAIL PROTECTED]> Subject: kernel-image-2.6.8-2-386: statfs returns wrong values for FAT fs X-Mailer: reportbug 3.8 Date: Sat, 07 May 2005 18:24:29 +0100 Message-Id: <[EMAIL PROTECTED]> Delivered-To: [EMAIL PROTECTED] X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 (1.212-2003-09-23-exp) on spohr.debian.org X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE autolearn=no version=2.60-bugs.debian.org_2005_01_02 X-Spam-Level: Package: kernel-image-2.6.8-2-386 Version: 2.6.8-13 Severity: important I have a 250Gb external USB 2.0 hard-drive formatted with FAT32 and "df" always reports 64Kb of used space on it, although it contains a couple of gigabytes. At first I thought the problem might be in "df" itself, but the following test code proves the statfs function is to blame. The values returned are incorrect. However, it does report correct values for another FAT32 partition I have (70Gb). ----------- statfs.c ----------- #include <sys/vfs.h> int main(int argc, char *argv[]) { struct statfs stats; long used; int kib; if (argc < 2) { printf("USAGE: %s <mountpoint>\n", argv[0]); return 1; } statfs(argv[1], &stats); used = stats.f_blocks - stats.f_bfree; printf("f_bsize = %ld blocks\nf_blocks = %ld blocks\nf_bfree = %ld blocks\nused = %ld blocks\n", stats.f_bsize, stats.f_blocks, stats.f_bfree, used); kib = stats.f_bsize / 1024; printf("total = %ld KiB\nfree = %ld KiB\nused = %ld KiB\n", kib * stats.f_blocks, kib * stats.f_bfree, kib * used); return 0; } ----------- eof - statfs.c ----------- -- System Information: Debian Release: 3.1 APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.8-2-386 Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1) Versions of packages kernel-image-2.6.8-2-386 depends on: ii coreutils [fileutils] 5.2.1-2 The GNU core utilities ii initrd-tools 0.1.78 tools to create initrd image for p ii module-init-tools 3.2-pre1-2 tools for managing Linux kernel mo -- no debconf information --------------------------------------- Received: (at 308072-done) by bugs.debian.org; 11 May 2005 01:50:13 +0000 >From [EMAIL PROTECTED] Tue May 10 18:50:13 2005 Return-path: <[EMAIL PROTECTED]> Received: from koto.vergenet.net [210.128.90.7] by spohr.debian.org with esmtp (Exim 3.35 1 (Debian)) id 1DVgMV-0003mZ-00; Tue, 10 May 2005 18:50:11 -0700 Received: by koto.vergenet.net (Postfix, from userid 7100) id 3857634031; Wed, 11 May 2005 10:23:49 +0900 (JST) Date: Wed, 11 May 2005 10:48:09 +0900 From: Horms <[EMAIL PROTECTED]> To: Carlos Rodrigues <[EMAIL PROTECTED]> Cc: [EMAIL PROTECTED] Subject: Re: statfs returns wrong values for 250Gb FAT fs Message-ID: <[EMAIL PROTECTED]> References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <[EMAIL PROTECTED]> X-Cluestick: seven User-Agent: Mutt/1.5.6+20040907i Delivered-To: [EMAIL PROTECTED] X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 (1.212-2003-09-23-exp) on spohr.debian.org X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no version=2.60-bugs.debian.org_2005_01_02 X-Spam-Level: On Tue, May 10, 2005 at 09:34:46PM +0100, Carlos Rodrigues wrote: > OGAWA Hirofumi wrote: > > >Filesystem may have the corrupted free-cluster value. > > > >I couldn't reproduce the problem on 2.6.12-rc4. > > > >Could you try a recently dosfsck (dosfstools-2.11 or later)? > >Also could you send the output of above program? > > > > > > "dosfsck" did find a problem in the free-cluster value. And also said > the backups FAT was different than the original FAT. > > I didn't use "dosfsck" to fix the problems though (not that it couldn't, > I just didn't try). As I had already copied everything to another disk, > I just used "mkdosfs" to reformat the drive, and it works just fine now. > > I still don't know what caused this, probably something related to some > "kernel panics" I was seeing on shutdown (in a Fedora 3 installation, > not Debian), after doing an umount+unplug. > > I didn't though of using "dosfsck" because Windows' checkdisk was saying > the filesystem was perfectly fine... It makes me feel really safe > trusting MS tools... not. Glad to hear that worked, I am going to close this bug. -- Horms -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]