hibernate-util: drop invalid assertion#35801
Closed
yuwata wants to merge 1 commit intosystemd:mainfrom
Closed
Conversation
When a swap file is on a btrfs RAID, then SwapEntries.devno is zero, and the entry is ignored. Hence, even if resume= kernel command line is unspecified (thus resume_config_devno == 0), no suitable swap entry will be found, and trigger the assertion(resume_config_devno > 0). This drops the assertion, and updates log messages. Also, checks if the found swap entry has valid devno before constructing HibernationDevice object. Fixes systemd#35798.
YHNdnzj
added a commit
to YHNdnzj/systemd
that referenced
this pull request
Jan 2, 2025
…cking dev This also makes find_suitable_hibernation_device() report more accurate error (ENOSPC -> ESTALE) if there's no swap space on the system at all but resume= is set. Fixes systemd#35798 Replaces systemd#35801
Member
|
-> #35802 |
YHNdnzj
added a commit
to YHNdnzj/systemd
that referenced
this pull request
Jan 2, 2025
…cking dev This also makes find_suitable_hibernation_device() report more accurate error (ENOSPC -> ESTALE) if there's no swap space on the system at all but resume= is set. Fixes systemd#35798 Replaces systemd#35801
daandemeyer
pushed a commit
to daandemeyer/systemd
that referenced
this pull request
Jan 7, 2025
…cking dev This also makes find_suitable_hibernation_device() report more accurate error (ENOSPC -> ESTALE) if there's no swap space on the system at all but resume= is set. Fixes systemd#35798 Replaces systemd#35801 (cherry picked from commit bd3d361)
daandemeyer
pushed a commit
to daandemeyer/systemd
that referenced
this pull request
Jan 7, 2025
…cking dev This also makes find_suitable_hibernation_device() report more accurate error (ENOSPC -> ESTALE) if there's no swap space on the system at all but resume= is set. Fixes systemd#35798 Replaces systemd#35801 (cherry picked from commit bd3d361)
slee649
pushed a commit
to slee649/systemd
that referenced
this pull request
Jan 7, 2025
…cking dev This also makes find_suitable_hibernation_device() report more accurate error (ENOSPC -> ESTALE) if there's no swap space on the system at all but resume= is set. Fixes systemd#35798 Replaces systemd#35801
bluca
pushed a commit
to bluca/systemd
that referenced
this pull request
Jan 7, 2025
…cking dev This also makes find_suitable_hibernation_device() report more accurate error (ENOSPC -> ESTALE) if there's no swap space on the system at all but resume= is set. Fixes systemd#35798 Replaces systemd#35801 (cherry picked from commit bd3d361) (cherry picked from commit 01686c3)
bluca
pushed a commit
to bluca/systemd
that referenced
this pull request
Jan 7, 2025
…cking dev This also makes find_suitable_hibernation_device() report more accurate error (ENOSPC -> ESTALE) if there's no swap space on the system at all but resume= is set. Fixes systemd#35798 Replaces systemd#35801 (cherry picked from commit bd3d361) (cherry picked from commit 01686c3)
goenkam
pushed a commit
to goenkam/systemd
that referenced
this pull request
Jan 8, 2025
…cking dev This also makes find_suitable_hibernation_device() report more accurate error (ENOSPC -> ESTALE) if there's no swap space on the system at all but resume= is set. Fixes systemd#35798 Replaces systemd#35801
sknsean
pushed a commit
to sknsean/systemd
that referenced
this pull request
Feb 6, 2025
…cking dev This also makes find_suitable_hibernation_device() report more accurate error (ENOSPC -> ESTALE) if there's no swap space on the system at all but resume= is set. Fixes systemd#35798 Replaces systemd#35801 (cherry picked from commit bd3d361) (cherry picked from commit 01686c3) (cherry picked from commit a354987)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a swap file is on a btrfs RAID, then SwapEntries.devno is zero, and the entry is ignored. Hence, even if resume= kernel command line is unspecified (thus resume_config_devno == 0), no suitable swap entry will be found, and trigger the assertion(resume_config_devno > 0).
This drops the assertion, and updates log messages. Also, checks if the found swap entry has valid devno before constructing HibernationDevice object.
Fixes #35798.