Re: [added to the 4.1 stable tree] xfs: Don't wrap growfs AGFL indexes
From: Sasha Levin <hidden>
Date: 2016-06-03 23:10:38
On 06/03/2016 07:05 PM, Dave Chinner wrote:
On Fri, Jun 03, 2016 at 05:35:03PM -0400, Sasha Levin wrote:quoted
quoted
From: Dave Chinner <redacted> 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:quoted
quoted
=============== [ Upstream commit ad747e3b299671e1a53db74963cc6c5f6cdb9f6d ]....quoted
quoted
cc: <redacted> # 4.4-4.5It says 4.4 and 4.5 only.
That's correct, but the commit that this patch fixes was:
commit 96f859d52bcb1c6ea6f3388d39862bf7143e2f30
Author: Darrick J. Wong [off-list ref]
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: [off-list ref] # 3.10 - 4.4
Signed-off-by: Darrick J. Wong [off-list ref]
Reviewed-by: Dave Chinner [off-list ref]
Signed-off-by: Dave Chinner [off-list ref]
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