mbox series

[v2,0/1] sed-opal: geometry feature reporting command

Message ID 20230411090931.9193-1-okozina@redhat.com (mailing list archive)
Headers show
Series sed-opal: geometry feature reporting command | expand

Message

Ondrej Kozina April 11, 2023, 9:09 a.m. UTC
While further testing various OPAL drives we have discovered that
some drives may impose alignment requirements that can not be
satisfied without reading some aditional parameters reported
by sed-opal iface.

We used to stick to physical block size reported by general block
device in place of LogicalBlockSize as reported by opal 'geometry',
but at least 2 aditional restrictions can not be easily mapped to
anything currently reported by block layer.

Without this patch we can not properly align locking ranges created
via sed-opal iface.

(Also it helps us to explain to userspace what went wrong)

Changes since previous version:

v2:
  - Mask proper bit for ALIGN value

Ondrej Kozina (1):
  sed-opal: geometry feature reporting command

 block/sed-opal.c              | 29 ++++++++++++++++++++++++++++-
 include/linux/sed-opal.h      |  1 +
 include/uapi/linux/sed-opal.h | 13 +++++++++++++
 3 files changed, 42 insertions(+), 1 deletion(-)

Comments

Ondrej Kozina April 19, 2023, 7:33 a.m. UTC | #1
On 11. 04. 23 11:09, Ondrej Kozina wrote:
>    sed-opal: geometry feature reporting command
> 

Hi Jens,

could we get this in 6.4? It's the last kernel bit we'd like to have to 
move further with userspace code discussed here:
https://gitlab.com/cryptsetup/cryptsetup/-/merge_requests/461

Kind regards
Ondrej
Jens Axboe April 19, 2023, 8:07 p.m. UTC | #2
On Tue, 11 Apr 2023 11:09:30 +0200, Ondrej Kozina wrote:
> While further testing various OPAL drives we have discovered that
> some drives may impose alignment requirements that can not be
> satisfied without reading some aditional parameters reported
> by sed-opal iface.
> 
> We used to stick to physical block size reported by general block
> device in place of LogicalBlockSize as reported by opal 'geometry',
> but at least 2 aditional restrictions can not be easily mapped to
> anything currently reported by block layer.
> 
> [...]

Applied, thanks!

[1/1] sed-opal: geometry feature reporting command
      commit: 9e05a2599a37295eb2dc5c03441daa6741abed4b

Best regards,