Bug 209563 - Querying the options set up for a swap device
Summary: Querying the options set up for a swap device
Status: NEW
Alias: None
Product: Memory Management
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 enhancement
Assignee: Andrew Morton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-07 13:47 UTC by Ulrich.Windl
Modified: 2020-10-07 13:47 UTC (History)
0 users

See Also:
Kernel Version: 5.3.18
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Ulrich.Windl 2020-10-07 13:47:14 UTC
This enhancement request is related to bug 209543, and it is based on an answer (https://unix.stackexchange.com/a/613350/320598) to a corresponding question at unix.stackexchange.com.

Traditionally the only options for swap was "pri=".  More recently one is able to specify an "discard option", too.
However, while the priority can be queried via "swapon -s" or /proc/swaps, you cannot get the discard settings for a swap device (my experience and the answer cited seem to indicate).

Therefore I suggest to allow easy retrieval of the discard (actually: any) option for each swap device.

Note You need to log in before you can comment on or make changes to this bug.