Messages in this thread Patch in this message | | | Date | Thu, 14 Jan 1999 10:57:22 +0100 | From | Jan Kara <> | Subject | [PATCH] Bug in loop device |
| |
Hello.
I've tracked down the bug in loop device. The problem was that when loop device created the block in sparse file it didn't update real_block and so it was writing block to block 0 of the device (I'm glad that SB is in block 1 ;-). This reminds me if it wouldn't be possible to add a check to fsck whether has anybody written anything to block 0 and warn about that... The patch I did should correct the bug (at least now loopback works for me).
Honza.
PS: I wonder how this could ever work ;-)
----------- CUT ME HERE ----------
--- /usr/src/linux/drivers/block/loop.c Wed Jan 13 23:02:21 1999 +++ /usr/src/linux/drivers/block/loop.c Wed Jan 13 23:55:01 1999 @@ -225,6 +225,7 @@ if (!create_missing_block(lo, block, blksize)) { goto error_out_lock; } + real_block = bmap(lo->lo_dentry->d_inode, block); } } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |