public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* tmpfs sparse file failure in glibc "make check"
@ 2004-01-30  3:35 Kevin P. Fleming
  2004-01-30 16:53 ` Hugh Dickins
  0 siblings, 1 reply; 5+ messages in thread
From: Kevin P. Fleming @ 2004-01-30  3:35 UTC (permalink / raw)
  To: LKML

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...


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-02-09  9:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1jKa4-1TZ-17@gated-at.bofh.it>
     [not found] ` <1jKjY-27v-35@gated-at.bofh.it>
2004-02-09  9:12   ` tmpfs sparse file failure in glibc "make check" Christoph Rohland
2004-01-30  3:35 Kevin P. Fleming
2004-01-30 16:53 ` Hugh Dickins
2004-01-30 17:07   ` Kevin P. Fleming
2004-01-30 17:47     ` Hugh Dickins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox