Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 30 Nov 2000 09:04:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 30 Nov 2000 09:04:16 -0500 Received: from eax.student.umd.edu ([129.2.228.67]:41480 "EHLO eax.student.umd.edu") by vger.kernel.org with ESMTP id ; Thu, 30 Nov 2000 09:04:08 -0500 Date: Thu, 30 Nov 2000 09:34:37 -0500 (EST) From: Adam To: Andreas Dilger cc: Marc Mutz , linux-kernel@vger.kernel.org Subject: Re: 'holey files' not holey enough. In-Reply-To: <200011292334.eATNYNB09518@webber.adilger.net> Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="42025956-1601409947-975594877=:1152" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --42025956-1601409947-975594877=:1152 Content-Type: TEXT/PLAIN; charset=US-ASCII On Wed, 29 Nov 2000, Andreas Dilger wrote: > What people who have the problem should be doing is: > [desc snipped] > > ls -li holed.file # find inode number > 10732 -rw-r--r-- 1 root root 6000000 Nov 29 16:17 holed.file > > du -sk holed.file # see what "stat" thinks > 983k holed.file > > debugfs /dev/XXX > debugfs> stats # find out ext2 block size > ... > Block size = 1024, fragment size = 1024 > ... > debugfs> stat <10732> # (with < and >) > Inode: 10732 Type: regular Mode: 0644 Flags: 0x0 Generation: > 4048594821 > User: 0 Group: 0 Size: 6000000 > File ACL: 0 Directory ACL: 0 > Links: 1 Blockcount: 1966 > ^^^^ these are 512-byte blocks, so / 2 for ~kB > they include indirect blocks and such > Fragment: Address: 0 Number: 0 Size: 0 > ctime: 0x3a258e82 -- Wed Nov 29 16:17:22 2000 > atime: 0x3a258e82 -- Wed Nov 29 16:17:22 2000 > mtime: 0x3a258e82 -- Wed Nov 29 16:17:22 2000 > BLOCKS: > 47512 47513 47514 47515 47516 47517 47518 47519 47520 ... 48723 48724 > TOTAL: 983 > ^^^ these are ext2fs sized blocks, not necessarily kB > > If what debugfs says doesn't match du, then it is du/libc/stat that is > broken. If debugfs says the file actually has 6000000 bytes of data, > then it is the filesystem that is broken. I just did what suggested, and it seems that DU reports correct values, I have attached 'sript' log of the above example on my filesystem. Here are some highlights: [adam@pepsi /tmp]$ ls -lis holed.file 3085069 5872 -rw-rw-r-- 1 adam adam 6000000 Nov 30 09:11 holed.file Block size = 4096, fragment size = 4096 Links: 1 Blockcount: 11744 TOTAL: 1468 so it seems DU reports correct values as : 1966/2 =983 11744/2=5872 and 4096*1468=6012928 1024*983 =1006592 -- Adam http://www.eax.com The Supreme Headquarters of the 32 bit registers --42025956-1601409947-975594877=:1152 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="holey.scr2" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="holey.scr2" U2NyaXB0IHN0YXJ0ZWQgb24gVGh1IE5vdiAzMCAwOToxMTo0MCAyMDAwDQpb YWRhbUBwZXBzaSAvdG1wXSQgZGQgaWY9L2Rldi96ZXJvIG9mPWhvbGVkLmZp bGUgYnM9MTAwMCBzZWVrPTUwMDAgY291bnQ9MTAwMA0KMTAwMCswIHJlY29y ZHMgaW4NCjEwMDArMCByZWNvcmRzIG91dA0KW2FkYW1AcGVwc2kgL3RtcF0k IGxzIC1saXMgaG9sZWQuZmlsZQ0KMzA4NTA2OSA1ODcyIC1ydy1ydy1yLS0g ICAgMSBhZGFtICAgICBhZGFtICAgICAgNjAwMDAwMCBOb3YgMzAgMDk6MTEg aG9sZWQuZmlsZQ0KW2FkYW1AcGVwc2kgL3RtcF0kIGR1IC1zaCBob2xlZC5m aWxlDQo1LjdNCWhvbGVkLmZpbGUNClthZGFtQHBlcHNpIC90bXBdJCBkZiAu DQpGaWxlc3lzdGVtICAgICAgICAgICAxay1ibG9ja3MgICAgICBVc2VkIEF2 YWlsYWJsZSBVc2U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OiAvdG1wB1ty b290QHBlcHNpIC90bXBdIyBleGl0DQpleGl0DQphZGFtQHBlcHNpOiAvdG1w B1thZGFtQHBlcHNpIC90bXBdJCBleGl0DQpleGl0DQpTY3JpcHQgZG9uZSBv biBUaHUgTm92IDMwIDA5OjE2OjI3IDIwMDANCg== --42025956-1601409947-975594877=:1152-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/