Commit 5f5321e
Paul Dagnelie
Handle interaction between gang blocks, copies, and FDT.
With the advent of fast dedup, there are no longer separate dedup tables
for different copies values. There is now logic that will add DVAs to
the dedup table entry if more copies are needed for new writes. However,
this interacts poorly with ganging. There are two different cases that
can result in mixed gang/non-gang BPs, which are illegal in ZFS.
This change modifies updates of existing FDT; if there are already gang
DVAs in the FDT, we prevent the new write from extending the DDT
entry. We cannot safely mix different gang trees in one block
pointer. if there are non-gang DVAs in the FDT, then this allocation may
not be gangs. If it would gang, we have to redo the whole write as a
non-dedup write.
This change also fixes a refcount leak that could occur if the lead DDT
write failed.
Sponsored by: iXsystems, Inc.
Sponsored-by: Klara, Inc.
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: Paul Dagnelie <[email protected]>
Closes: #171231 parent 1d8f625 commit 5f5321e
File tree
6 files changed
+156
-14
lines changed- include/sys
- module/zfs
- tests
- runfiles
- zfs-tests/tests
- functional/gang_blocks
6 files changed
+156
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
| 355 | + | |
| 356 | + | |
355 | 357 | | |
356 | 358 | | |
357 | 359 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
856 | 856 | | |
857 | 857 | | |
858 | 858 | | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
859 | 870 | | |
860 | 871 | | |
861 | 872 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3145 | 3145 | | |
3146 | 3146 | | |
3147 | 3147 | | |
| 3148 | + | |
| 3149 | + | |
| 3150 | + | |
| 3151 | + | |
| 3152 | + | |
| 3153 | + | |
| 3154 | + | |
| 3155 | + | |
| 3156 | + | |
| 3157 | + | |
| 3158 | + | |
3148 | 3159 | | |
3149 | 3160 | | |
3150 | 3161 | | |
| |||
3614 | 3625 | | |
3615 | 3626 | | |
3616 | 3627 | | |
3617 | | - | |
3618 | | - | |
3619 | | - | |
3620 | | - | |
3621 | | - | |
3622 | | - | |
3623 | | - | |
3624 | | - | |
3625 | | - | |
3626 | | - | |
3627 | 3628 | | |
3628 | 3629 | | |
3629 | 3630 | | |
| |||
3635 | 3636 | | |
3636 | 3637 | | |
3637 | 3638 | | |
| 3639 | + | |
| 3640 | + | |
| 3641 | + | |
| 3642 | + | |
| 3643 | + | |
| 3644 | + | |
| 3645 | + | |
| 3646 | + | |
| 3647 | + | |
| 3648 | + | |
3638 | 3649 | | |
3639 | 3650 | | |
3640 | 3651 | | |
| |||
3650 | 3661 | | |
3651 | 3662 | | |
3652 | 3663 | | |
| 3664 | + | |
| 3665 | + | |
| 3666 | + | |
| 3667 | + | |
| 3668 | + | |
| 3669 | + | |
| 3670 | + | |
| 3671 | + | |
| 3672 | + | |
| 3673 | + | |
3653 | 3674 | | |
3654 | 3675 | | |
3655 | 3676 | | |
| |||
3769 | 3790 | | |
3770 | 3791 | | |
3771 | 3792 | | |
| 3793 | + | |
3772 | 3794 | | |
3773 | | - | |
| 3795 | + | |
3774 | 3796 | | |
| 3797 | + | |
| 3798 | + | |
3775 | 3799 | | |
3776 | 3800 | | |
3777 | 3801 | | |
| |||
3901 | 3925 | | |
3902 | 3926 | | |
3903 | 3927 | | |
3904 | | - | |
| 3928 | + | |
3905 | 3929 | | |
3906 | 3930 | | |
3907 | 3931 | | |
| |||
3916 | 3940 | | |
3917 | 3941 | | |
3918 | 3942 | | |
| 3943 | + | |
| 3944 | + | |
| 3945 | + | |
| 3946 | + | |
| 3947 | + | |
| 3948 | + | |
| 3949 | + | |
| 3950 | + | |
3919 | 3951 | | |
3920 | 3952 | | |
3921 | 3953 | | |
3922 | 3954 | | |
3923 | 3955 | | |
3924 | 3956 | | |
3925 | | - | |
| 3957 | + | |
| 3958 | + | |
| 3959 | + | |
| 3960 | + | |
| 3961 | + | |
| 3962 | + | |
| 3963 | + | |
3926 | 3964 | | |
3927 | 3965 | | |
3928 | 3966 | | |
| |||
4106 | 4144 | | |
4107 | 4145 | | |
4108 | 4146 | | |
| 4147 | + | |
4109 | 4148 | | |
4110 | 4149 | | |
4111 | 4150 | | |
| |||
5391 | 5430 | | |
5392 | 5431 | | |
5393 | 5432 | | |
| 5433 | + | |
| 5434 | + | |
| 5435 | + | |
| 5436 | + | |
| 5437 | + | |
| 5438 | + | |
| 5439 | + | |
| 5440 | + | |
| 5441 | + | |
| 5442 | + | |
5394 | 5443 | | |
5395 | 5444 | | |
5396 | 5445 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
726 | 726 | | |
727 | 727 | | |
728 | 728 | | |
729 | | - | |
| 729 | + | |
730 | 730 | | |
731 | 731 | | |
732 | 732 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1561 | 1561 | | |
1562 | 1562 | | |
1563 | 1563 | | |
| 1564 | + | |
1564 | 1565 | | |
1565 | 1566 | | |
1566 | 1567 | | |
| |||
Lines changed: 79 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
0 commit comments