Skip to contentSkip to conversation

PM: Compress hibernation image with LZO

PATCH In review Bojan Smojver 1 participant 1 message Aug 10, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 PM: Compress hibernation image with LZO

Please queue for merge in 2.6.36.
---------------------

Given that hibernation image is compressed, we need the data here and now in order to decompress it, so a flag to read synchronously is redundant (i.e. we always read synchronously).

---

 kernel/power/power.h    |    4 ----
 kernel/power/snapshot.c |    5 -----
 2 files changed, 0 insertions(+), 9 deletions(-)
kernel/power/power.h +0 -4
index 006270f..a760cf8 100644
@@ -103,10 +103,6 @@ struct snapshot_handle {
 	void		*buffer;	/* address of the block to read from
 					 * or write to
 					 */
-	int		sync_read;	/* Set to one to notify the caller of
-					 * snapshot_write_next() that it may
-					 * need to call wait_on_bio_chain()
-					 */
 };
 
 /* This macro returns the address from/to which the caller of
kernel/power/snapshot.c +0 -5
index 25ce010..f24ee24 100644
@@ -2135,8 +2135,6 @@ int snapshot_write_next(struct snapshot_handle *handle)
 	if (handle->cur > 1 && handle->cur > nr_meta_pages + nr_copy_pages)
 		return 0;
 
-	handle->sync_read = 1;
-
 	if (!handle->cur) {
 		if (!buffer)
 			/* This makes the buffer be freed by swsusp_free() */
@@ -2169,7 +2167,6 @@ int snapshot_write_next(struct snapshot_handle *handle)
 			memory_bm_position_reset(&orig_bm);
 			restore_pblist = NULL;
 			handle->buffer = get_buffer(&orig_bm, &ca);
-			handle->sync_read = 0;
 			if (IS_ERR(handle->buffer))
 				return PTR_ERR(handle->buffer);
 		}
@@ -2178,8 +2175,6 @@ int snapshot_write_next(struct snapshot_handle *handle)
 		handle->buffer = get_buffer(&orig_bm, &ca);
 		if (IS_ERR(handle->buffer))
 			return PTR_ERR(handle->buffer);
-		if (handle->buffer != buffer)
-			handle->sync_read = 0;
 	}
 	handle->cur++;
 	return PAGE_SIZE;
Signature · 1 line
Bojan