From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751819AbdHLIjH (ORCPT ); Sat, 12 Aug 2017 04:39:07 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:37610 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750862AbdHLIjF (ORCPT ); Sat, 12 Aug 2017 04:39:05 -0400 From: Chandan Rajendra To: Arnd Bergmann Cc: "Theodore Ts'o" , Andreas Dilger , Stefan Agner , Jan Kara , Daeho Jeong , "Darrick J. Wong" , Konstantin Khlebnikov , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ext4: fix clang build regression Date: Sat, 12 Aug 2017 14:09:29 +0530 In-Reply-To: <20170807105701.3835991-1-arnd@arndb.de> References: <20170807105701.3835991-1-arnd@arndb.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-TM-AS-MML: disable x-cbid: 17081208-0048-0000-0000-000002582DA2 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17081208-0049-0000-0000-0000480BE245 Message-Id: <48473218.z3lFQE8RDq@localhost.localdomain> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-08-12_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1706020000 definitions=main-1708120142 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, August 7, 2017 4:26:51 PM IST Arnd Bergmann wrote: > As Stefan pointed out, I misremembered what clang can do specifically, > and it turns out that the variable-length array at the end of the > structure did not work (a flexible array would have worked here > but not solved the problem): > > fs/ext4/mballoc.c:2303:17: error: fields must have a constant size: > 'variable length array in structure' extension will never be supported > ext4_grpblk_t counters[blocksize_bits + 2]; > > This reverts part of my previous patch, using a fixed-size array > again, but keeping the check for the array overflow. > > Fixes: 2df2c3402fc8 ("ext4: fix warning about stack corruption") > Reported-by: Stefan Agner > Signed-off-by: Arnd Bergmann I executed xfstests on a ppc64 machine with both 4k and 64k block size combination. Tested-by: Chandan Rajendra -- chandan