From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eli Carter Subject: .truncate extending a file Date: Thu, 10 Jul 2003 17:22:40 -0500 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <3F0DE730.8060001@inet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from zeke.inet.com ([199.171.211.198]:48791 "EHLO zeke.inet.com") by vger.kernel.org with ESMTP id S269649AbTGJWID (ORCPT ); Thu, 10 Jul 2003 18:08:03 -0400 Received: from tex.inetint.com (tex [172.16.99.35]) by zeke.inet.com (INET SMTP Server) with ESMTP id h6AMMh3U010800 for ; Thu, 10 Jul 2003 17:22:43 -0500 (CDT) Received: from harpo.inetint.com (localhost [127.0.0.1]) by tex.inetint.com (8.12.1/8.12.1) with ESMTP id h6AMMfPl009339 for ; Thu, 10 Jul 2003 17:22:41 -0500 (CDT) Received: from inet.com ([172.16.20.84]) by harpo.inetint.com (Netscape Messaging Server 4.15) with ESMTP id HHTY5S00.LSS for ; Thu, 10 Jul 2003 17:22:40 -0500 To: linux-fsdevel@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org All, I'm trying to understand what the .truncate method is supposed to do when the file size is extended. (Using 2.5.68-rmk1) dd if=/dev/zero count=1 seek=3 of=tempfile In my filesystem, if I imediately read it back, I get the garbage from the disk for the first 3 blocks, but if I umount/mount the filesystem, the data is the 4 blocks of zeros expected. So it looks like there is a mapping of some sort that I'm missing, but I'm at a loss. Any pointers to docs, examples, etc? Is there something I can read to understand what is going on with buffer heads in a filesystem context? Something I should grep or Google for? TIA, Eli --------------------. "If it ain't broke now, Eli Carter \ it will be soon." -- crypto-gram eli.carter(a)inet.com `-------------------------------------------------