From patchwork Mon Mar 4 19:36:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10838399 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 507921803 for ; Mon, 4 Mar 2019 19:37:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3DC352B2DE for ; Mon, 4 Mar 2019 19:37:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 31D7F2B2E8; Mon, 4 Mar 2019 19:37:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF3F92B2DE for ; Mon, 4 Mar 2019 19:37:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726066AbfCDThh (ORCPT ); Mon, 4 Mar 2019 14:37:37 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:41843 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726038AbfCDThg (ORCPT ); Mon, 4 Mar 2019 14:37:36 -0500 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1MJVY8-1gh14P47YG-00JvBc; Mon, 04 Mar 2019 20:37:26 +0100 From: Arnd Bergmann To: "Darrick J. Wong" , linux-xfs@vger.kernel.org Cc: Christoph Hellwig , Arnd Bergmann , Dave Chinner , Brian Foster , linux-kernel@vger.kernel.org Subject: [PATCH] xfs: mark xfs_dir2_sf_entry_t as __packed again Date: Mon, 4 Mar 2019 20:36:47 +0100 Message-Id: <20190304193723.657089-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:wXjoFVzi3CaIX/kd0PSUSW/UMteqMiuiM0hOYrJAchPiuY8ucN2 szrEsz+19lnKPNjoEl9LQgTRfObe0rGn1aFFWfSRR8mbvdZitzBOrcL9+GVS2mRNAIKbHh0 oOH3xgrcveCiwx/TKDOhhqdd2dJa5YhL5859Hs7UxyrkYQFMV8IXNE+vecaYUqEOKANZBcM Qe0WFJix/pAqM3o4ncuug== X-UI-Out-Filterresults: notjunk:1;V03:K0:6x01TYg4aRM=:STmeLI/8ogrJQE2/kLUYp+ 1JeloQY3OSBYYrSeAKDpOwicDLnQO0PVirGa8XKz8oOFpj5VCNuVeOhoYkGWV01uYdHtJaIgL aJ3+DebPhMlQlinKQxs1qmc5AYjCjZFmMCM/KZIdKwSIc6JOyPjkkJWW3Ih5LFLPuea/WAkLt n5iofEPRkvwvi7f7WFcW3/UeB0sniRCook2AEDPpzzdWfx9sqXAmeQvpjSQ0T3wHVuy5WFdVN sPEw4rh6YVBuhnNyz/7Vjs8YZRt37IPG6yDLERxpNG6BjzUWJ2U0M58tTt1mgVA73VrScrfjZ jKxyHkkPd1eIJ9v4TvAyApyMEWwvHSIUg6ZSd4p9Enrc9ngvLI7PINw+9/xoIUsYibWI92RsY 4n9Wd5Ncl4wMG9OAmIjB/3QDJZzr875CEygyIUzQ2wkyav9aaSr0+djLc72qQHoy5H4qf1bEw 10TpsGRcrLwoNHeAMdWdAaHul6rxoam8KfOgXZ3GI9CWf9GgQE+1j0XSokkKPOUKgP/QDTLXq 2kPTk1UkrSLMdzxKDKfOdAKFSasGJuxEfdUc6FCMkddDY8Xd2ArN+QgRZuF68dCTFNP/H7dlR 8PF+afh0p+/S7ZQ2l0CPYO/jARMh17a1G2J2NPg+p2vVgfjgOoYQkaOQ+WPAk7su9iOuwq4PZ hR701LC4Mf17Ht8P63DMnDqFYrFZmN8Mfgt8ghn2RuJQzbTztEcfmkDDuPaG4D+KYpalu3EAn K9Fgtzm/PW4jfLZm844DyaCwjEIEA7U3K+DKLA== Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP For ARM OABI builds, we run into a compile time assertion: inlined from 'init_xfs_fs' at /git/arm-soc/fs/xfs/xfs_super.c:1991:2: fs/xfs/xfs_ondisk.h:119:208: error: call to '__compiletime_assert_119' declared with attribute error: XFS: sizeof(xfs_dir2_sf_entry_t) is wrong, expected 3 While ARM OABI is pretty much dead and fails to build for typical configurations on modern architectures (ARMv6 or higher), and has been declared deprecated in user space since gcc-4.6, the kernel still allows it to used for building the kernel. In commit 8353a649f577 ("xfs: kill xfs_dir2_sf_off_t"), Christoph removed the old __arch_pack annotation that made it possible to build xfs with oddball ABIs. However, OABI not only requrires padding around short structure but still adds padding after this change. There is no harm to unconditionally mark the structure as __packed now, and that will do the right thing here. As of commit aa2dd0ad4d6d ("xfs: remove __arch_pack"), we need to use __packed here as well, instead of the old __arch_pack. Fixes: 8353a649f577 ("xfs: kill xfs_dir2_sf_off_t") Signed-off-by: Arnd Bergmann --- fs/xfs/libxfs/xfs_da_format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/xfs/libxfs/xfs_da_format.h b/fs/xfs/libxfs/xfs_da_format.h index ae654e06b2fb..fa8f07451d39 100644 --- a/fs/xfs/libxfs/xfs_da_format.h +++ b/fs/xfs/libxfs/xfs_da_format.h @@ -230,7 +230,7 @@ typedef struct xfs_dir2_sf_entry { * A 64-bit or 32-bit inode number follows here, at a variable offset * after the name. */ -} xfs_dir2_sf_entry_t; +} __packed xfs_dir2_sf_entry_t; static inline int xfs_dir2_sf_hdr_size(int i8count) {