Re: 2 KiB/block loopback found where

Pat LaVarre
2003-09-29T17:12:35Z

> > I want a 2 KiB/block loopback device ...
> > I get 0.5 KiB/block ...
> > 0.5 KiB divides evenly into 2 KiB.
>
> Add a quick hack to loop
> to set 2kb block size,
> grep for set_blocksize.

Great hint forward, thanks. My first guess at what we mean follows,
I'll report back to say how this goes.

Pat LaVarre

diff -Nur linux-2.6.0-test6/drivers/block/loop.c linux/drivers/block/loop.c

--- linux-2.6.0-test6/drivers/block/loop.c 2003-09-27 18:50:29.000000000 -0600
+++ linux/drivers/block/loop.c 2003-09-29 11:06:50.057826432 -0600
@@ -732,7 +732,7 @@
mapping_set_gfp_mask(inode->i_mapping,
lo->old_gfp_mask & ~(__GFP_IO|__GFP_FS));

- set_blocksize(bdev, lo_blocksize);
+ set_blocksize(bdev, 0x800); // not lo_blocksize);

lo->lo_bio = lo->lo_biotail = NULL;