NetBSD Problem Report #46246

From dholland@netbsd.org  Thu Mar 22 16:45:49 2012
Return-Path: <dholland@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id E524463B946
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 22 Mar 2012 16:45:48 +0000 (UTC)
Message-Id: <20120322164558.B0D7C14A14F@mail.netbsd.org>
Date: Thu, 22 Mar 2012 16:45:58 +0000 (UTC)
From: dholland@netbsd.org
Reply-To: dholland@netbsd.org
To: gnats-bugs@gnats.NetBSD.org
Subject: tmpfs does not support sparse files (!?)
X-Send-Pr-Version: 3.95

>Number:         46246
>Category:       kern
>Synopsis:       tmpfs does not support sparse files (!?)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 22 16:50:01 +0000 2012
>Last-Modified:  Mon Mar 26 05:45:01 +0000 2012
>Originator:     David A. Holland
>Release:        NetBSD 5.99.65
>Organization:
>Environment:
System: NetBSD  5.99.65 NetBSD 5.99.65 (GENERIC) #65: Mon Feb 13 01:38:30 EST 2012  dholland@valkyrie:/disk/disk1/home/dholland/netbsd/quotafix/src/sys/arch/i386/compile/obj.i386/GENERIC i386
Architecture: i386
Machine: i386
>Description:

tmpfs does not appear to support sparse files.

>How-To-Repeat:

# cat /root/x.c
#include <stdlib.h>
#include <unistd.h>
#include <err.h>

int main(int argc, char *argv[]) {
    if (truncate(argv[1], atol(argv[2])))
        err(1, "truncate");
    return 0;
}
# ls -l
# touch foo
# /root/x foo `expr 1024 \* 1024 \* 4`
# du foo
4096    foo
# 

>Fix:
send rmind chocolate? :-)

>Audit-Trail:
From: yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi)
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org
Subject: Re: kern/46246: tmpfs does not support sparse files (!?)
Date: Mon, 26 Mar 2012 05:41:33 +0000 (UTC)

 > tmpfs does not appear to support sparse files.

 iirc, a tmpfs file can be sparse as its underlying aobj does.
 but its GETATTR doesn't know the sparseness.

 YAMAMOTO Takarhi

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.