Commit 2056446
committed
Merge: [xfstests xfs/017] xfs_repair fails and hit XFS: Assertion failed: 0, file: fs/xfs/xfs_icache.c, line: 1840
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/6047
JIRA: https://issues.redhat.com/browse/RHEL-56816
```
xfs: fix freeing speculative preallocations for preallocated files
xfs_can_free_eofblocks returns false for files that have persistent
preallocations unless the force flag is passed and there are delayed
blocks. This means it won't free delalloc reservations for files
with persistent preallocations unless the force flag is set, and it
will also free the persistent preallocations if the force flag is
set and the file happens to have delayed allocations.
Both of these are bad, so do away with the force flag and always free
only post-EOF delayed allocations for files with the XFS_DIFLAG_PREALLOC
or APPEND flags set.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
(cherry picked from commit 610b291)
```
Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>
---
<small>Created 2024-12-17 14:02 UTC by backporter - [KWF FAQ](https://red.ht/kernel_workflow_doc) - [Slack #team-kernel-workflow](https://redhat-internal.slack.com/archives/C04LRUPMJQ5) - [Source](https://gitlab.com/cki-project/kernel-workflow/-/blob/main/webhook/utils/backporter.py) - [Documentation](https://gitlab.com/cki-project/kernel-workflow/-/blob/main/docs/README.backporter.md) - [Report an issue](https://gitlab.com/cki-project/kernel-workflow/-/issues/new?issue%5Btitle%5D=backporter%20webhook%20issue)</small>
Approved-by: Brian Foster <bfoster@redhat.com>
Approved-by: Carlos Maiolino <cmaiolino@redhat.com>
Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com>
Merged-by: Augusto Caringi <acaringi@redhat.com>File tree
4 files changed
+28
-20
lines changed- fs/xfs
4 files changed
+28
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
489 | 489 | | |
490 | 490 | | |
491 | 491 | | |
492 | | - | |
493 | | - | |
| 492 | + | |
494 | 493 | | |
495 | 494 | | |
496 | 495 | | |
497 | | - | |
498 | | - | |
| 496 | + | |
499 | 497 | | |
500 | 498 | | |
501 | 499 | | |
| |||
529 | 527 | | |
530 | 528 | | |
531 | 529 | | |
532 | | - | |
533 | | - | |
| 530 | + | |
| 531 | + | |
534 | 532 | | |
535 | 533 | | |
536 | | - | |
| 534 | + | |
537 | 535 | | |
538 | 536 | | |
539 | 537 | | |
| |||
587 | 585 | | |
588 | 586 | | |
589 | 587 | | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
590 | 604 | | |
591 | 605 | | |
592 | 606 | | |
| |||
900 | 914 | | |
901 | 915 | | |
902 | 916 | | |
903 | | - | |
| 917 | + | |
904 | 918 | | |
905 | 919 | | |
906 | 920 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1147 | 1147 | | |
1148 | 1148 | | |
1149 | 1149 | | |
1150 | | - | |
| 1150 | + | |
1151 | 1151 | | |
1152 | 1152 | | |
1153 | 1153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1462 | 1462 | | |
1463 | 1463 | | |
1464 | 1464 | | |
1465 | | - | |
| 1465 | + | |
1466 | 1466 | | |
1467 | 1467 | | |
1468 | 1468 | | |
| |||
1678 | 1678 | | |
1679 | 1679 | | |
1680 | 1680 | | |
1681 | | - | |
1682 | | - | |
1683 | | - | |
| 1681 | + | |
1684 | 1682 | | |
1685 | 1683 | | |
1686 | 1684 | | |
1687 | 1685 | | |
1688 | 1686 | | |
1689 | | - | |
| 1687 | + | |
1690 | 1688 | | |
1691 | 1689 | | |
1692 | 1690 | | |
| |||
1734 | 1732 | | |
1735 | 1733 | | |
1736 | 1734 | | |
1737 | | - | |
1738 | | - | |
1739 | | - | |
1740 | | - | |
1741 | 1735 | | |
1742 | 1736 | | |
1743 | 1737 | | |
1744 | 1738 | | |
1745 | | - | |
| 1739 | + | |
1746 | 1740 | | |
1747 | 1741 | | |
1748 | 1742 | | |
| |||
0 commit comments