Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752167AbdHPOo3 (ORCPT ); Wed, 16 Aug 2017 10:44:29 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:38429 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752066AbdHPOo1 (ORCPT ); Wed, 16 Aug 2017 10:44:27 -0400 From: Cihangir Akturk To: lustre-devel@lists.lustre.org Cc: oleg.drokin@intel.com, andreas.dilger@intel.com, jsimmons@infradead.org, gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Cihangir Akturk Subject: [PATCH] staging: lustre: fix structure size for ARM OABI Date: Wed, 16 Aug 2017 17:44:15 +0300 Message-Id: <1502894655-9731-1-git-send-email-cakturk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1309 Lines: 32 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 --- 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