Repository navigation
Commit 78bf473
block: sed-opal: fix IOC_OPAL_ENABLE_DISABLE_MBR
The implementation of IOC_OPAL_ENABLE_DISABLE_MBR handled the value
opal_mbr_data.enable_disable incorrectly: enable_disable is expected
to be one of OPAL_MBR_ENABLE(0) or OPAL_MBR_DISABLE(1). enable_disable
was passed directly to set_mbr_done and set_mbr_enable_disable where
is was interpreted as either OPAL_TRUE(1) or OPAL_FALSE(0). The end
result was that calling IOC_OPAL_ENABLE_DISABLE_MBR with OPAL_MBR_ENABLE
actually disabled the shadow MBR and vice versa.
This patch adds correct conversion from OPAL_MBR_DISABLE/ENABLE to
OPAL_FALSE/TRUE. The change affects existing programs using
IOC_OPAL_ENABLE_DISABLE_MBR but this is typically used only once when
setting up an Opal drive.
Acked-by: Jon Derrick <jonathan.derrick@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Scott Bauer <sbauer@plzdonthack.me>
Signed-off-by: David Kozub <zub@linux.fjfi.cvut.cz>
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 72deb45 commit 78bf473
1 file changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2095 | 2095 | | |
2096 | 2096 | | |
2097 | 2097 | | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
2098 | 2101 | | |
2099 | 2102 | | |
2100 | 2103 | | |
2101 | | - | |
| 2104 | + | |
2102 | 2105 | | |
2103 | 2106 | | |
2104 | | - | |
| 2107 | + | |
2105 | 2108 | | |
2106 | 2109 | | |
2107 | 2110 | | |
| |||
2221 | 2224 | | |
2222 | 2225 | | |
2223 | 2226 | | |
2224 | | - | |
| 2227 | + | |
2225 | 2228 | | |
2226 | 2229 | | |
2227 | 2230 | | |
| |||
0 commit comments