diff options
author | Luca Boccassi <bluca@debian.org> | 2023-02-10 01:06:12 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-02-17 06:15:53 -0700 |
commit | 9ec041ea40dbc6425c0ee6ae15786e5ab1d6aad6 (patch) | |
tree | 116c9cc1afc8fb6545afebb6eda5adeeb66908d0 /block | |
parent | 0aa2988e4fd23c0c8b33999d7b47dfbc5e6bf24b (diff) |
sed-opal: add support flag for SUM in status ioctl
Not every OPAL drive supports SUM (Single User Mode), so report this
information to userspace via the get-status ioctl so that we can adjust
the formatting options accordingly.
Tested on a kingston drive (which supports it) and a samsung one
(which does not).
Signed-off-by: Luca Boccassi <bluca@debian.org>
Link: https://lore.kernel.org/r/20230210010612.28729-1-luca.boccassi@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r-- | block/sed-opal.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/sed-opal.c b/block/sed-opal.c index 463873f61e01..c320093c14f1 100644 --- a/block/sed-opal.c +++ b/block/sed-opal.c @@ -487,6 +487,8 @@ static int opal_discovery0_end(struct opal_dev *dev) break; case FC_SINGLEUSER: single_user = check_sum(body->features); + if (single_user) + dev->flags |= OPAL_FL_SUM_SUPPORTED; break; case FC_GEOMETRY: check_geometry(dev, body); |