-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix "kmem -i" and "swap" commands on Linux 6.10-rc1 and later kernels
Kernel commit 798cb7f9aec3 ("swapon(2)/swapoff(2): don't bother with block size") removed swap_info_struct.old_block_size member at Linux 6.10-rc1. The crash-utility has used this to determine whether a swap is a partition or file and to determine the way to get the swap path. Withtout the patch, the "kmem -i" and "swap" commands fail with the following error messsage: crash> kmem -i ... TOTAL HUGE 13179392 50.3 GB ---- HUGE FREE 13179392 50.3 GB 100% of TOTAL HUGE swap: invalid (optional) structure member offsets: swap_info_struct_swap_device or swap_info_struct_old_block_size FILE: memory.c LINE: 16032 FUNCTION: dump_swap_info() The swap_file member of recent swap_info_struct is a pointer to a struct file (once upon a time it was dentry), use this fact directly. Tested-by: Li Zhijian <[email protected]> Signed-off-by: Kazuhito Hagio <[email protected]>
- Loading branch information
Showing
4 changed files
with
26 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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