Date: Wed, 29 Sep 2004 15:43:28 -0700 From: Nehal <nehalmistry@gmx.net> To: David Schultz <das@FreeBSD.ORG> Cc: freebsd-fs@FreeBSD.ORG Subject: Re: data blocks question Message-ID: <20040929154328.00001444@nehal> In-Reply-To: <20040929204233.GB30629@VARK.MIT.EDU> References: <20040929101403.000027aa@nehal> <20040929204233.GB30629@VARK.MIT.EDU>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 29 Sep 2004 16:42:33 -0400 David Schultz <das@FreeBSD.ORG> wrote: > On Wed, Sep 29, 2004, Nehal wrote: > > on my ufs2 partition, there is a file that has a size of > > 65536, and has 2 direct blocks only. the block size of the fs > > is 16k and fragment block size is 2k. > > > > how can this be possible? wouldn't 2 direct blocks mean that > > the maximum size is 2x16k = 32k? or am i not understanding > > something correctly? > > > > i've made a copy of the file, and the new file has 4 direct > > blocks. > > > > it is a binary file, and i can read it fine (ie, cat it). i've > > done fsck on the filesystem and it found no problem. > > Yes, UFS supports sparse files. That is, you can have a file > with parts you haven't written to, and the blocks for those > parts won't be allocated. The cp utility doesn't know about > this, though, so copies will have the ``holes'' filled with > zeroes. > how would i determine the offset and length of these 'holes' for sparse files? Nehal
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040929154328.00001444>