From: Greg Willits Date: 2009-07-06T16:44:35+09:00 Subject: Re: file.seek and unused bytes Brian Candler wrote: > Greg Willits wrote: >> I still don't see where the nulls come from (if they're not being >> written) > > All disk I/O is done in terms of whole blocks (typically 1K) > > Whenever the filesystem adds a new block to a file, insteading of > reading the existing contents into the VFS cache it just zero-fills a > block in the VFS cache. A write to an offset then updates that block and > marks it 'dirty'. The entire block will then at some point get written > back to disk, including of course any of the zeros which were not > overwritten with user data. Ah. That's what I was looking for. thanks. -- Posted via http://www.ruby-forum.com/.