mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
xfs: revert "xfs: fix rmap key and record comparison functions"
[ Upstream commiteb8409071a
] This reverts commit6ff646b2ce
. Your maintainer committed a major braino in the rmap code by adding the attr fork, bmbt, and unwritten extent usage bits into rmap record key comparisons. While XFS uses the usage bits *in the rmap records* for cross-referencing metadata in xfs_scrub and xfs_repair, it only needs the owner and offset information to distinguish between reverse mappings of the same physical extent into the data fork of a file at multiple offsets. The other bits are not important for key comparisons for index lookups, and never have been. Eric Sandeen reports that this causes regressions in generic/299, so undo this patch before it does more damage. Reported-by: Eric Sandeen <sandeen@sandeen.net> Fixes:6ff646b2ce
("xfs: fix rmap key and record comparison functions") Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
730b192ad2
commit
088ad76f42
1 changed files with 8 additions and 8 deletions
|
@ -247,8 +247,8 @@ xfs_rmapbt_key_diff(
|
|||
else if (y > x)
|
||||
return -1;
|
||||
|
||||
x = be64_to_cpu(kp->rm_offset);
|
||||
y = xfs_rmap_irec_offset_pack(rec);
|
||||
x = XFS_RMAP_OFF(be64_to_cpu(kp->rm_offset));
|
||||
y = rec->rm_offset;
|
||||
if (x > y)
|
||||
return 1;
|
||||
else if (y > x)
|
||||
|
@ -279,8 +279,8 @@ xfs_rmapbt_diff_two_keys(
|
|||
else if (y > x)
|
||||
return -1;
|
||||
|
||||
x = be64_to_cpu(kp1->rm_offset);
|
||||
y = be64_to_cpu(kp2->rm_offset);
|
||||
x = XFS_RMAP_OFF(be64_to_cpu(kp1->rm_offset));
|
||||
y = XFS_RMAP_OFF(be64_to_cpu(kp2->rm_offset));
|
||||
if (x > y)
|
||||
return 1;
|
||||
else if (y > x)
|
||||
|
@ -393,8 +393,8 @@ xfs_rmapbt_keys_inorder(
|
|||
return 1;
|
||||
else if (a > b)
|
||||
return 0;
|
||||
a = be64_to_cpu(k1->rmap.rm_offset);
|
||||
b = be64_to_cpu(k2->rmap.rm_offset);
|
||||
a = XFS_RMAP_OFF(be64_to_cpu(k1->rmap.rm_offset));
|
||||
b = XFS_RMAP_OFF(be64_to_cpu(k2->rmap.rm_offset));
|
||||
if (a <= b)
|
||||
return 1;
|
||||
return 0;
|
||||
|
@ -423,8 +423,8 @@ xfs_rmapbt_recs_inorder(
|
|||
return 1;
|
||||
else if (a > b)
|
||||
return 0;
|
||||
a = be64_to_cpu(r1->rmap.rm_offset);
|
||||
b = be64_to_cpu(r2->rmap.rm_offset);
|
||||
a = XFS_RMAP_OFF(be64_to_cpu(r1->rmap.rm_offset));
|
||||
b = XFS_RMAP_OFF(be64_to_cpu(r2->rmap.rm_offset));
|
||||
if (a <= b)
|
||||
return 1;
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue