From 5330dd1565a21ee26c1a1d9e7e47385bcd6ddfab Mon Sep 17 00:00:00 2001 From: nvt Date: Sat, 30 Jul 2011 10:05:23 +0200 Subject: [PATCH] Avoid reading bytes from the original file when their is a log entry for that part of the file. --- core/cfs/cfs-coffee.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/cfs/cfs-coffee.c b/core/cfs/cfs-coffee.c index cbfd93e51..f9b503fec 100644 --- a/core/cfs/cfs-coffee.c +++ b/core/cfs/cfs-coffee.c @@ -1135,8 +1135,8 @@ cfs_read(int fd, void *buf, unsigned size) /* Read from the original file if we cannot find the data in the log. */ if(r < 0) { - COFFEE_READ(buf, bytes_left, absolute_offset(file->page, fdp->offset)); - r = bytes_left; + COFFEE_READ(buf, lp.size, absolute_offset(file->page, fdp->offset)); + r = lp.size; } fdp->offset += r; buf = (char *)buf + r;