From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from userp1040.oracle.com ([156.151.31.81]:45257 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753126AbcFCXKi (ORCPT ); Fri, 3 Jun 2016 19:10:38 -0400 Subject: Re: [added to the 4.1 stable tree] xfs: Don't wrap growfs AGFL indexes To: Dave Chinner References: <1464989831-16666-1-git-send-email-sasha.levin@oracle.com> <1464989831-16666-8-git-send-email-sasha.levin@oracle.com> <20160603230550.GT12670@dastard> Cc: stable@vger.kernel.org, stable-commits@vger.kernel.org, Dave Chinner From: Sasha Levin Message-ID: <57520E62.7000103@oracle.com> Date: Fri, 3 Jun 2016 19:10:26 -0400 MIME-Version: 1.0 In-Reply-To: <20160603230550.GT12670@dastard> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: On 06/03/2016 07:05 PM, Dave Chinner wrote: > On Fri, Jun 03, 2016 at 05:35:03PM -0400, Sasha Levin wrote: >> > From: Dave Chinner >> > >> > This patch has been added to the 4.1 stable tree. If you have any >> > objections, please let us know. > This should not go to the 4.1 tree. Check the stable notification > information, please: > >> > =============== >> > >> > [ Upstream commit ad747e3b299671e1a53db74963cc6c5f6cdb9f6d ] > .... >> > cc: # 4.4-4.5 > It says 4.4 and 4.5 only. That's correct, but the commit that this patch fixes was: commit 96f859d52bcb1c6ea6f3388d39862bf7143e2f30 Author: Darrick J. Wong Date: Mon Jan 4 16:13:21 2016 +1100 libxfs: pack the agfl header structure so XFS_AGFL_SIZE is correct Because struct xfs_agfl is 36 bytes long and has a 64-bit integer inside it, gcc will quietly round the structure size up to the nearest 64 bits -- in this case, 40 bytes. This results in the XFS_AGFL_SIZE macro returning incorrect results for v5 filesystems on 64-bit machines (118 items instead of 119). As a result, a 32-bit xfs_repair will see garbage in AGFL item 119 and complain. Therefore, tell gcc not to pad the structure so that the AGFL size calculation is correct. cc: # 3.10 - 4.4 Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner Which, as you see, was marked for and backported to -stable versions prior to 4.4, which is why I've preferred to queue this commit even though it's not supposed to go in and see if anyone objects. Thanks, Sasha