From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amos Waterland Subject: Zero free bytes incorrectly reported by initramfs Date: Sun, 25 Nov 2007 22:41:36 -0500 Message-ID: <20071126034136.GA13266@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: linux-fsdevel@vger.kernel.org Return-path: Received: from e2.ny.us.ibm.com ([32.97.182.142]:35384 "EHLO e2.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754082AbXKZDlk (ORCPT ); Sun, 25 Nov 2007 22:41:40 -0500 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e2.ny.us.ibm.com (8.13.8/8.13.8) with ESMTP id lAQ3fblR002049 for ; Sun, 25 Nov 2007 22:41:37 -0500 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v8.7) with ESMTP id lAQ3fbd3482012 for ; Sun, 25 Nov 2007 22:41:37 -0500 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id lAQ3faOe008481 for ; Sun, 25 Nov 2007 22:41:36 -0500 Received: from kvasir.watson.ibm.com (kvasir.watson.ibm.com [9.2.218.19]) by d01av02.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id lAQ3faFj008473 for ; Sun, 25 Nov 2007 22:41:36 -0500 Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Hi. The initramfs filesystem reports zero bytes free when queried with the statfs system call, even when there are 8 GB or more free memory. This is a problem for me because I am building software appliances that run entirely out of an initramfs. I need to allow the user to install a package with apt-get (of course, the install will not be persistent across reboots). The apt-get source checks the f_bfree field in the statfs struct and bails out when it sees a zero. I have submitted a patch[1] against apt-get to just blindly plow ahead if the filesystem type is RAMFS, but I would prefer to get some input from this list regarding the best way to proceed. Why does initramfs report zero bytes free? -- [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=448316