read as much as possible, even when reading log records.

This commit is contained in:
nvt-se 2008-10-21 13:26:24 +00:00
parent 1878fc18d5
commit b591bb1b72

View file

@ -913,10 +913,6 @@ cfs_read(int fd, void *buf, unsigned size)
lp.size = remains; lp.size = remains;
r = read_log_page(&hdr, r = read_log_page(&hdr,
fdp->next_log_entry > 0 ? fdp->next_log_entry - 1 : -1, &lp); fdp->next_log_entry > 0 ? fdp->next_log_entry - 1 : -1, &lp);
if(r >= 0) {
offset += r;
break;
}
} }
if(r < 0) { if(r < 0) {
r = remains > COFFEE_PAGE_SIZE ? COFFEE_PAGE_SIZE : remains; r = remains > COFFEE_PAGE_SIZE ? COFFEE_PAGE_SIZE : remains;