Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c40c751a authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "PM / hibernate: Add CONFIG_HIBERNATION_IMAGE_REUSE"

parents bb07c569 018bf898
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -77,6 +77,23 @@ config HIBERNATION

	  For more information take a look at <file:Documentation/power/swsusp.txt>.

config HIBERNATION_IMAGE_REUSE
	bool "Reuse hibernation image"
	depends on HIBERNATION
	---help---
	  By default this hibernation image is erased after either a
	  successful or unsuccessful hibernation restore sequeunce. Since
	  filesystem contents on disk are not part of the hibernation
	  image, failure to create a new hibernation image every boot can
	  lead to filesystem corruption.

	  Conversely, if the usecase can guarantee that the filesystem is
	  not ever modified, the same hibernation image can be reused. This
	  prevents creating additional hibernation images unncesarily.

	  For more details, refer to the description of CONFIG_HIBERNATION
	  for booting without resuming.

config ARCH_SAVE_PAGE_KEYS
	bool

+2 −0
Original line number Diff line number Diff line
@@ -1542,10 +1542,12 @@ int swsusp_check(void)

		if (!memcmp(HIBERNATE_SIG, swsusp_header->sig, 10)) {
			memcpy(swsusp_header->sig, swsusp_header->orig_sig, 10);
#ifndef CONFIG_HIBERNATION_IMAGE_REUSE
			/* Reset swap signature now */
			error = hib_submit_io(REQ_OP_WRITE, WRITE_SYNC,
						swsusp_resume_block,
						swsusp_header, NULL);
#endif
		} else {
			error = -EINVAL;
		}