From: Eric Subject: files mapped funny? (related to online defragmentation) Date: Mon, 21 May 2007 06:49:58 -0700 Message-ID: <1179755398.389.24.camel@eric-laptop> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-r1LvZIMaRi6l3uLJvANI" To: linux-ext4 Return-path: Received: from wx-out-0506.google.com ([66.249.82.229]:2433 "EHLO wx-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756589AbXEUNuH (ORCPT ); Mon, 21 May 2007 09:50:07 -0400 Received: by wx-out-0506.google.com with SMTP id i26so289332wxd for ; Mon, 21 May 2007 06:50:06 -0700 (PDT) Sender: linux-ext4-owner@vger.kernel.org List-Id: linux-ext4.vger.kernel.org --=-r1LvZIMaRi6l3uLJvANI Content-Type: multipart/mixed; boundary="=-9ZjQUMwxcCMSK57msf6C" --=-9ZjQUMwxcCMSK57msf6C Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, I'm getting strange results when I map out the blocks used in files larger than a several thousand KB. I never seem to get any more than 1024 contiguous data blocks in a row.=20 Here's a portion of the output of my script when I run it on a 176MB file in my home directory: ... Contiguous chunk 67: 2385568 - 2385591 (24 blocks) Contiguous chunk 68: 2385608 - 2386448 (841 blocks) Contiguous chunk 69: 2386450 - 2387473 (1024 blocks) Contiguous chunk 70: 2387475 - 2388498 (1024 blocks) Contiguous chunk 71: 2388500 - 2389523 (1024 blocks) ... Maybe this is a bug in my script? Can anyone explain why this would happen? I'm attaching my script in case other ext2/3/4 newbies can get any use out of it, and in case anyone needs to see it in order to answer my question. It's pretty self-explanatory, though. Cheers, Eric --=-9ZjQUMwxcCMSK57msf6C Content-Disposition: attachment; filename=fibmap.py Content-Transfer-Encoding: base64 Content-Type: text/x-python; name=fibmap.py; charset=UTF-8 IyEvdXNyL2Jpbi9weXRob24NCg0KIyBFcmljJ3MgZmlyc3QgcHl0aG9uIHByb2dyYW0gOikNCg0K aW1wb3J0IHN5cyAjZm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name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBGUaOGe2L37HVup3ARAphwAKDawpUOzw16yW4Bv+lYPqOQcDKApgCg2HD+ cecO9gQQwRNoofva+j/mZMI= =SdJc -----END PGP SIGNATURE----- --=-r1LvZIMaRi6l3uLJvANI--