X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Fri, 10 Dec 2010 17:59:30 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: 1.7.7: upper limit to df reported available size? Message-ID: <20101210165930.GA5210@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <33F9E32CDB0917428758DD583E747CC80DC11C1C AT OntExch3 DOT ontario DOT int DOT ec DOT gc DOT ca> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <33F9E32CDB0917428758DD583E747CC80DC11C1C@OntExch3.ontario.int.ec.gc.ca> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Dec 10 11:20, Elford,Andrew [Ontario] wrote: > 11TiB file system displays incorrect available space using df. 'Size' > and 'used' is correct. Smaller file systems (6T) are showing correct > values. > > CYGWIN_NT-6.0-WOW64 server 1.7.7(0.230/5/3) 2010-08-31 09:58 i686 Cygwin > > $ df --version > df (GNU coreutils) 8.5 > Packaged by Cygwin (8.5-2) > ... > > $ df -T /cygdrive/f/file > Filesystem Type 1K-blocks Used Available Use% Mounted on > C: ntfs 83886076 31717608 52168468 38% /cygdrive/c > F: ntfs 11717703676 72036296 -5534201804 - /cygdrive/f > L: ntfs 6143999996 883063196 5260936800 15% /cygdrive/l > Given the surprising simplicity of the statvfs algorithm in Cygwin, I wonder if this is a bug in df. Actually, Cygwin just copies over the lower 32 bit of the Windows value into the POSIX structure. Assuming a 4K cluster size, this should be ok up to a disk size of about 17 TiB. Hmm. OTOH, seeing the size of your FS, I'm also wondering if we should make the algorithm a bit more foolproof for the future by manipulating the value of f_frsize if the TotalAllocationUnits returned by Windows is > sizeof (fsblkcnt_t). Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple