public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: "Mark Knibbs" <markk@clara.co.uk>
To: linux-ext4@vger.kernel.org
Cc: markk@clara.co.uk
Subject: Possible ext2 bug with large sparse files?
Date: Tue, 05 Jun 2007 13:25:29 +0100	[thread overview]
Message-ID: <E1HvY6M-000Ai0-Ff@oceanus.uk.clara.net> (raw)

Hi, 

I have encountered a problem/issue relating to using ext2 filesystems with 
(very) large sparse files, where the file length is much larger than the 
filesystem size. 

I'm using an x86 PC, the same issue appears in kernel 2.6.14 & 2.6.20. Use 
dd 5.97 to replicate the problem. 

On a ~500MB ext2 volume with about 60MB free (a 512MB flash card in a USB 
reader), testing using dd like this:
 dd if=/dev/zero of=test.bin bs=1 count=1 seek=17247252479
works fine, but
 dd if=/dev/zero of=test.bin bs=1 count=1 seek=17247252480
gives a "File size limit exceeded" message and this warning appears in dmesg 
output:
 "EXT2-fs warning (device sdd): ext2_block_to_path: block > big" 

[For whatever reason, it seems the maximum file size for that
partition is 17,247,252,480 bytes. In itself that behaviour isn't 
necessarily a bug; but if you have any clue how the ext2 maximum file size 
is related (or not) to the amount of free space or the volume size, please 
let me know!] 

After doing
 dd if=/dev/zero of=test.bin bs=1 count=1 seek=17247252480
ls -l shows test.bin to be 17247252480 bytes long. 

I unmounted the partition and used e2fsck -f to check it:
 # e2fsck -f /dev/sdd
 e2fsck 1.38 (30-Jun-2005)
 Pass 1: Checking inodes, blocks, and sizes
 Inode 123466, i_size is 17247252480, should be 0.  Fix<y>? yes 

 Pass 2: Checking directory structure
 Pass 3: Checking directory connectivity
 Pass 4: Checking reference counts
 Pass 5: Checking group summary information 

 VolName: ***** FILE SYSTEM WAS MODIFIED *****
 VolName: 107/125488 files (2.8% non-contiguous), 428147/501760 blocks 


Regards,
 -- Mark 

             reply	other threads:[~2007-06-05 12:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-05 12:25 Mark Knibbs [this message]
2007-06-05 13:56 ` Possible ext2 bug with large sparse files? Theodore Tso
  -- strict thread matches above, loose matches on Subject: below --
2007-06-06 13:18 Mark Knibbs
2007-06-07 17:51 ` Andreas Dilger
2007-06-07 21:40   ` Mark Knibbs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1HvY6M-000Ai0-Ff@oceanus.uk.clara.net \
    --to=markk@clara.co.uk \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox