Commit 610b291
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 <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
Signed-off-by: Chandan Babu R <[email protected]>1 parent f266106 commit 610b291
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 | |
|---|---|---|---|
| |||
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
489 | | - | |
490 | | - | |
| 489 | + | |
491 | 490 | | |
492 | 491 | | |
493 | 492 | | |
494 | | - | |
495 | | - | |
| 493 | + | |
496 | 494 | | |
497 | 495 | | |
498 | 496 | | |
| |||
526 | 524 | | |
527 | 525 | | |
528 | 526 | | |
529 | | - | |
530 | | - | |
| 527 | + | |
| 528 | + | |
531 | 529 | | |
532 | 530 | | |
533 | | - | |
| 531 | + | |
534 | 532 | | |
535 | 533 | | |
536 | 534 | | |
| |||
584 | 582 | | |
585 | 583 | | |
586 | 584 | | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
587 | 601 | | |
588 | 602 | | |
589 | 603 | | |
| |||
891 | 905 | | |
892 | 906 | | |
893 | 907 | | |
894 | | - | |
| 908 | + | |
895 | 909 | | |
896 | 910 | | |
897 | 911 | | |
| |||
| 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 | |
|---|---|---|---|
| |||
1155 | 1155 | | |
1156 | 1156 | | |
1157 | 1157 | | |
1158 | | - | |
| 1158 | + | |
1159 | 1159 | | |
1160 | 1160 | | |
1161 | 1161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1595 | 1595 | | |
1596 | 1596 | | |
1597 | 1597 | | |
1598 | | - | |
| 1598 | + | |
1599 | 1599 | | |
1600 | 1600 | | |
1601 | 1601 | | |
| |||
1856 | 1856 | | |
1857 | 1857 | | |
1858 | 1858 | | |
1859 | | - | |
1860 | | - | |
1861 | | - | |
| 1859 | + | |
1862 | 1860 | | |
1863 | 1861 | | |
1864 | 1862 | | |
1865 | 1863 | | |
1866 | 1864 | | |
1867 | | - | |
| 1865 | + | |
1868 | 1866 | | |
1869 | 1867 | | |
1870 | 1868 | | |
| |||
1947 | 1945 | | |
1948 | 1946 | | |
1949 | 1947 | | |
1950 | | - | |
1951 | | - | |
1952 | | - | |
1953 | | - | |
1954 | 1948 | | |
1955 | 1949 | | |
1956 | 1950 | | |
1957 | 1951 | | |
1958 | | - | |
| 1952 | + | |
1959 | 1953 | | |
1960 | 1954 | | |
1961 | 1955 | | |
| |||
0 commit comments