Loading kernel/power/Kconfig +17 −0 Original line number Diff line number Diff line Loading @@ -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 Loading kernel/power/swap.c +2 −0 Original line number Diff line number Diff line Loading @@ -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; } Loading Loading
kernel/power/Kconfig +17 −0 Original line number Diff line number Diff line Loading @@ -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 Loading
kernel/power/swap.c +2 −0 Original line number Diff line number Diff line Loading @@ -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; } Loading