From: "Kevin P. Fleming" <kpfleming@backtobasicsmgmt.com>
To: LKML <linux-kernel@vger.kernel.org>
Subject: tmpfs sparse file failure in glibc "make check"
Date: Thu, 29 Jan 2004 20:35:56 -0700 [thread overview]
Message-ID: <4019D11C.7020706@backtobasicsmgmt.com> (raw)
I've been tracking down a problem in CVS glibc "make check" and it
appears that either it's a bug in tmpfs or an undocumented limitation of
tmpfs.
My system is running 2.6.2-rc2, with 1G of physical RAM (4G highmem mode
is enabled in the kernel). The glibc test does the following (snipped
from the source because it's a simple test):
int fd;
#define TWO_GB 2147483648LL
...
fd = mkstemp64 (name);
ret = lseek64 (fd, TWO_GB+100, SEEK_SET);
ret = write (fd, "Hello", 5);
On my system the temp file is created in /tmp, and tmpfs is mounted on
/tmp (with no mount options limiting maximum size or anything of that
type). With no swap space turned on, this write() returns ENOMEM.
With 512MB or 1GB of swap space, it still returns ENOMEM. With 1.5GB of
swap space, the write() succeeds. However, this is a sparse file with a
total of 6 bytes of content :-)
I could understand if tmpfs was limiting the file size to half of
physical RAM+swap, but the test succeeds at 2.5GB total even though the
sparse file is created at 2GB size.
For now I work around the test failure by pointing glibc to a different
filesystem for this test, but I'm wondering why the tmpfs filesystem
can't pass this test like a "normal" filesystem does...
next reply other threads:[~2004-01-30 3:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-30 3:35 Kevin P. Fleming [this message]
2004-01-30 16:53 ` tmpfs sparse file failure in glibc "make check" Hugh Dickins
2004-01-30 17:07 ` Kevin P. Fleming
2004-01-30 17:47 ` Hugh Dickins
[not found] <1jKa4-1TZ-17@gated-at.bofh.it>
[not found] ` <1jKjY-27v-35@gated-at.bofh.it>
2004-02-09 9:12 ` Christoph Rohland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4019D11C.7020706@backtobasicsmgmt.com \
--to=kpfleming@backtobasicsmgmt.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox