]> git.hungrycats.org Git - linux/commit
[PATCH] loop: fix hard sector size
authorAndrew Morton <akpm@osdl.org>
Mon, 19 Jan 2004 02:05:31 +0000 (18:05 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Mon, 19 Jan 2004 02:05:31 +0000 (18:05 -0800)
commit9644d0d98484be61fefb397ea59e8902046d98eb
tree2ec3b28cf3805ddaa26403d42af48be3f058c8fb
parent59d997a581a444cac2facfed0feea408de40efdc
[PATCH] loop: fix hard sector size

From: Ben Slusky <sluskyb@paranoiacs.org>

We need to set the hardsect_size of the loop device to that of the real
device.

The loop device advertises a block size of 1024 even when configured over a
cdrom.

When burning a ext2 on a cd, and mounting it directly, I get:

blocksize=2048;

when I losetup /dev/loop0 /dev/cdrom, and then try to mount, I get:

blocksize=1024; and then misaligned transfer; this results in not being able
to read the superblock.

The loop device should be changed to export the same blocksize of the
underlying device
drivers/block/loop.c