lkml.org 
[lkml]   [2017]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] staging: lustre: fix structure size for ARM OABI
Date
When building the kernel for the ARM architecture without setting
CONFIG_AEABI, size of struct lov_user_md_v3 and struct lov_mds_md_v3
differs, due to different alignment requirements of OABI and EABI.

Marking the anonymous union within struct lov_user_md_v3 as
'_packed' solves this issue. Otherwise we get the following
error:

drivers/staging/lustre/lustre/lov/lov_pack.c:352:2: note: in expansion
of macro ‘BUILD_BUG_ON’
BUILD_BUG_ON(sizeof(lum) != sizeof(struct lov_mds_md_v3));

Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
---
drivers/staging/lustre/lustre/include/lustre/lustre_user.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
index edff8dc..4f72cb6 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
@@ -388,7 +388,7 @@ struct lov_user_md_v3 { /* LOV EA user data (host-endian) */
__u16 lmm_layout_gen; /* layout generation number
* used when reading
*/
- };
+ } __packed;
char lmm_pool_name[LOV_MAXPOOLNAME + 1]; /* pool name */
struct lov_user_ost_data_v1 lmm_objects[0]; /* per-stripe data */
} __packed;
--
2.7.4
\
 
 \ /
  Last update: 2017-08-16 16:44    [W:0.058 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site