Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35678
b: refs/heads/master
c: 8c00249
h: refs/heads/master
v: v3
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Sep 26, 2006
1 parent dfcb12e commit c2b8a99
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ab954160350c91c77ae03740ef90458c3ad5412c
refs/heads/master: 8c002494b55119a3fd1dddee83b4fb75cfda47e5
5 changes: 5 additions & 0 deletions trunk/kernel/power/swap.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,12 +522,15 @@ static int load_image(struct swap_map_handle *handle,
unsigned int m;
int ret;
int error = 0;
struct timeval start;
struct timeval stop;

printk("Loading image data pages (%u pages) ... ", nr_pages);
m = nr_pages / 100;
if (!m)
m = 1;
nr_pages = 0;
do_gettimeofday(&start);
do {
ret = snapshot_write_next(snapshot, PAGE_SIZE);
if (ret > 0) {
Expand All @@ -539,11 +542,13 @@ static int load_image(struct swap_map_handle *handle,
nr_pages++;
}
} while (ret > 0);
do_gettimeofday(&stop);
if (!error) {
printk("\b\b\b\bdone\n");
if (!snapshot_image_loaded(snapshot))
error = -ENODATA;
}
show_speed(&start, &stop, nr_pages, "Read");
return error;
}

Expand Down

0 comments on commit c2b8a99

Please sign in to comment.