Re: 2 KiB/block loopback found where

Jens Axboe
2003-09-29T16:46:53Z

On Mon, Sep 29 2003, Pat LaVarre wrote:
>
> I want a 2 KiB/block loopback device to help debug udf.ko.
>
> I get 0.5 KiB/block. Did I fail to find an option or an appropriate
> kernel patch, I do I have to write my own patch? I'm guessing I'll find
> 2 KiB/block easy to fake, since 0.5 KiB divides evenly into 2 KiB.
>
> Specifically, I want to see 2048 where now I see 512 in response to my
> query `blockdev --getss`. A more complete example console log follows:
>
> Pat LaVarre
>
> $
> $ dd of=dd.bin bs=1M count=1 if=/dev/zero
> 1+0 records in
> 1+0 records out
> $
> $ ls -l dd.bin
> -rw-rw-r-- 1 pat pat 1048576 Sep 29 09:43 dd.bin
> $
> $ sudo /sbin/losetup /dev/loop0 dd.bin
> $
> $ sudo blockdev --getss /dev/loop0
> 512
> $

Add a quick hack to loop to set 2kb block size, grep for set_blocksize.

--
Jens Axboe