From 882c0c2761a9b28a2cfb3024170d4c1904b9ae5a Mon Sep 17 00:00:00 2001 From: Andrzej Zaborowski Date: Sat, 29 Jan 2011 01:29:17 +0100 Subject: [PATCH] simfs: Reset op_source in simfs_read_block If the block is not in cache or if this is the last block of a last op in the queue, then fs->op_source might be left with the wrong value. --- src/simfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/simfs.c b/src/simfs.c index b77e1dc0..35045a12 100644 --- a/src/simfs.c +++ b/src/simfs.c @@ -269,6 +269,8 @@ static gboolean sim_fs_op_read_block(gpointer user_data) int end_block; unsigned short read_bytes; + fs->op_source = 0; + start_block = op->offset / 256; end_block = (op->offset + (op->num_bytes - 1)) / 256;