[lkml]   [2001]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: loop device broken in 2.4.6-pre5 wrote:
> From: Jari Ruusu <>
> File backed loop device on 4k block size ext2 filesystem:
> # dd if=/dev/zero of=file1 bs=1024 count=10
> 10+0 records in
> 10+0 records out
> # losetup /dev/loop0 file1
> # dd if=/dev/zero of=/dev/loop0 bs=1024 count=10 conv=notrunc
> dd: /dev/loop0: No space left on device
> 9+0 records in
> 8+0 records out
> # tune2fs -l /dev/hda1 2>&1| grep "Block size"
> Block size: 4096
> # uname -a
> Linux debian 2.4.6-pre5 #1 Thu Jun 21 14:27:25 EEST 2001 i686 unknown
> Stock 2.4.5 and 2.4.5-ac15 don't have this problem.
> I am not sure there is an error here.
> The default block size of a loop device is that of the underlying device.
> There was a kernel bug that was recently fixed, where the block size
> of a file backed loop device could be essentially random.
> So, earlier you happened to get blocksize 1024, and you had room for
> 10 blocks of size 1024.
> Now you have blocksize 4096, and you have room for 2 blocks of size 4096.
> There are no fractional blocks at the end of a block device.

Why can't we keep the default at 1024 regardless of what the block size of
underlying device is. There are some situations where all of loop device
must be accessed before it is mounted (at which point the block size is set
to desired value).

Jari Ruusu <>
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:55    [W:0.653 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site