Using the __packed directive for a structure that does not need it is wrong because it makes gcc generate suboptimal code on some architectures. Hence remove the __packed directive from the blk_zone_report structure definition. See also http://digitalvampire.org/blog/index.php/2006/07/31/why-you-shouldnt-use-__attribute__packed/.
Showing the changes to include/uapi/linux (1 of 1 file). Show all
Unified · Split
| @@ -117,7 +117,7 @@ struct blk_zone_report { · 116 unmodified lines | |||
| 117 | __u32 nr_zones; | 117 | __u32 nr_zones; |
| 118 | __u8 reserved[4]; | 118 | __u8 reserved[4]; |
| 119 | struct blk_zone zones[0]; | 119 | struct blk_zone zones[0]; |
| 120 | } __packed; | 120 | }; |
| 121 | 121 | ||
| 122 | /** | 122 | /** |
| 123 | * struct blk_zone_range - BLKRESETZONE ioctl request | 123 | * struct blk_zone_range - BLKRESETZONE ioctl request |