Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp259598pxb; Thu, 14 Jan 2021 05:24:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJw+MVlNucUDYAd0Vctjs4hpXsNzohT2THU43IUBGHhO+ufEg4xWWerL9E96rXxeHtGMFcUI X-Received: by 2002:a17:906:1308:: with SMTP id w8mr5111469ejb.396.1610630661503; Thu, 14 Jan 2021 05:24:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610630661; cv=none; d=google.com; s=arc-20160816; b=x9k6dQlomb1Em+c7i6N92eijB4VUGnYKD/tok0CEIFkV4g5iB8dx9KTjWGGC6a6U/8 /NIbFs4+C0Pzr8PbhEXYBTl+NaB2e1iBm00eBPvxSxsXTony1VHzYr+H2TZFA83yVNrV U/HBLu3gHDhYkqCoYpDLboHF22fqZ73YbUhb6m6NTW0WVWsMfvS0bYwlAuxhDZsUwNCc Ecp5zQAUk1m9KtNXWI1TbGYhlGTRVsybgjOpUVbsdu/BE0Av4NG3x65+dDcG4g/zz+TQ CqawMaPhNIEU2YLg6meRQGMst09qpc2r3q9OYhSI0GIqysyybYUOBC5+oFmtWyYQxWGa 1oVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=/90/Xbf2m6JYl0ykjEgUEtVrPXIYN1k4nPwLHWE6DJw=; b=cvCvpqEjO4Wc8hdtgBGoLqXTZrx/pOG0r6mpvgPkJ//08F3PGa0u5sefnm2e3sirlB ZCT5S/9Ve/egYwk1gwT5W+1vMYZrf0FST5rny249KmFAZ2mPLuaTz4scS/zSqq+c2Ay2 TyED7taidMAnhdz2Zb8Yo6kK3giYrQKR3KAvUH7vn707O40CpixIXTvNFuFW2LfUSsUO zhyF7J06vVbmVVKA4NJ/Kn+hG/D6Hu3p3GBCmAwRXc/WbNYSsmPdnN59Gb/TwphKlx7l lUeBin0ngOXyM44wjT8rpIOHi4cVPE44fBHciY+rprp+6hRYKFAQ1mKSYOBBndmMo9en s1EQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q16si2444994ejd.199.2021.01.14.05.23.49; Thu, 14 Jan 2021 05:24:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727063AbhANNXi (ORCPT + 99 others); Thu, 14 Jan 2021 08:23:38 -0500 Received: from bmailout3.hostsharing.net ([176.9.242.62]:56461 "EHLO bmailout3.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725991AbhANNXi (ORCPT ); Thu, 14 Jan 2021 08:23:38 -0500 X-Greylist: delayed 548 seconds by postgrey-1.27 at vger.kernel.org; Thu, 14 Jan 2021 08:23:37 EST Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "RapidSSL TLS DV RSA Mixed SHA256 2020 CA-1" (verified OK)) by bmailout3.hostsharing.net (Postfix) with ESMTPS id 41E2910195B69; Thu, 14 Jan 2021 14:13:48 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 1078331C7F; Thu, 14 Jan 2021 14:13:48 +0100 (CET) Date: Thu, 14 Jan 2021 14:13:48 +0100 From: Lukas Wunner To: Linus Torvalds Cc: Will Deacon , Peter Zijlstra , Arnd Bergmann , Russell King - ARM Linux admin , linux-toolchains@vger.kernel.org, Mark Rutland , Theodore Ts'o , "linux-kernel@vger.kernel.org" , Andreas Dilger , Ext4 Developers List , Linux ARM Subject: Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues Message-ID: <20210114131348.GA1343@wunner.de> References: <20210107111841.GN1551@shell.armlinux.org.uk> <20210107124506.GO1551@shell.armlinux.org.uk> <20210107133747.GP1551@shell.armlinux.org.uk> <20210108092655.GA4031@willie-the-truck> <20210112132049.GA26096@wunner.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue, Jan 12, 2021 at 09:28:32AM -0800, Linus Torvalds wrote: > On Tue, Jan 12, 2021 at 5:20 AM Lukas Wunner wrote: > > > Variable declarations in for-loops is the only one I can think of. I > > > think that would clean up some code (and some macros), but might not > > > be compelling on its own. > > > > Anonymous structs/unions. I used to have a use case for that in > > struct efi_dev_path in include/linux/efi.h, but Ard Biesheuvel > > refactored it in a gnu89-compatible way for v5.7 with db8952e7094f. > > We use anonymous structs/unions extensively and all over the place already. Yes, my apologies, I mixed things up. Back in 2016 when I authored 46cd4b75cd0e, what I wanted to do was include an unnamed "struct efi_generic_dev_path;" in struct efi_dev_path: struct efi_dev_path { struct efi_generic_dev_path; union { struct { u32 hid; u32 uid; } acpi; struct { u8 fn; u8 dev; } pci; }; } __attribute ((packed)); The alternative is to copy-paste the elements of struct efi_dev_path or to give it a name such as "header" (which is what db8952e7094f subsequently did). Both options seemed inelegant to me. However it turns out this feature requires -fms-extensions. It's not part of -std=gnu11. So coming back to topic, yes there doesn't seem to be too much to be gained from moving to -std=gnu11 aside from variable declarations in for-loops. (And it really has to be -std=gnu11 because -std=c11 fails to compile.) Thanks, Lukas