lkml.org 
[lkml]   [1999]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.494 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site