• Andrew Morton's avatar
    [PATCH] loop: fix hard sector size · 9644d0d9
    Andrew Morton authored
    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
    9644d0d9
loop.c 29.1 KB