Subject: tmpfs sparse files?
To: None <tech-kern@netbsd.org>
From: Simon Burge <simonb@wasabisystems.com>
List: tech-kern
Date: 11/09/2005 23:44:26
I just tried to create a sparse file in a tmpfs, and noticed that it
doesn't appear very sparse - quite dense in fact:
euclid 57> df .
Filesystem 1K-blocks Used Avail Capacity Mounted on
tmpfs 721740 324 721416 0% /tmp
euclid 58> dd if=/dev/zero of=foo bs=1 seek=99999999 count=1
1+0 records in
1+0 records out
1 bytes transferred in 0.001 secs (1000 bytes/sec)
euclid 59> df .
Filesystem 1K-blocks Used Avail Capacity Mounted on
tmpfs 819396 97984 721412 11% /tmp
euclid 60> ls -ls foo
97660 -rw-r--r-- 1 simonb wheel 100000000 Nov 9 23:35 foo
The same dd command on a 3.0 box with mfs /tmp shows this file:
24 -rw-r--r-- 1 simonb wheel 100000000 Nov 9 23:36 foo
Simon.
--
Simon Burge <simonb@wasabisystems.com>
NetBSD Development, Support and Service: http://www.wasabisystems.com/