lkml.org 
[lkml]   [2019]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] block: sed-opal: add ioctl for done-mark of shadow mbr
On Wed, 1 May 2019, David Kozub wrote:

> @@ -104,6 +109,12 @@ struct opal_mbr_data {
> __u8 __align[7];
> };
>
> +struct opal_mbr_done {
> + struct opal_key key;
> + __u8 done_flag;
> + __u8 __align[7];
> +};

While I just copied opal_mbr_data here, I wonder what is the point of
__align in these structs. By itself it just pads the structure to have a
size that is a multiple of 8. Is this to make sure that anything that lies
past the structure is 8-bytes aligned (assuming the start is 8-bytes
aligned too), perhaps for 32bit userspace with 64bit kernel?

And if it's this, is it needed for these IOCTL structs? (I can see it
being useful for struct opal_key.)

Best regards,
David

\
 
 \ /
  Last update: 2019-05-01 12:38    [W:0.137 / U:1.992 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site