Commit a34eef6
Kent Overstreet
bcachefs: Don't keep tons of cached pointers around
We had a bug report where the data update path was creating an extent
that failed to validate because it had too many pointers; almost all of
them were cached.
To fix this, we have:
- want_cached_ptr(), a new helper that checks if we even want a cached
pointer (is on appropriate target, device is readable).
- bch2_extent_set_ptr_cached() now only sets a pointer cached if we want
it.
- bch2_extent_normalize_by_opts() now ensures that we only have a single
cached pointer that we want.
While working on this, it was noticed that this doesn't work well with
reflinked data and per-file options. Another patch series is coming that
plumbs through additional io path options through bch_extent_rebalance,
with improved option handling.
Reported-by: Reed Riley <[email protected]>
Signed-off-by: Kent Overstreet <[email protected]>1 parent 3fd27e9 commit a34eef6
File tree
5 files changed
+89
-28
lines changed- fs/bcachefs
5 files changed
+89
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
| 239 | + | |
| 240 | + | |
240 | 241 | | |
241 | 242 | | |
242 | 243 | | |
| |||
284 | 285 | | |
285 | 286 | | |
286 | 287 | | |
287 | | - | |
| 288 | + | |
| 289 | + | |
288 | 290 | | |
289 | 291 | | |
290 | 292 | | |
| |||
295 | 297 | | |
296 | 298 | | |
297 | 299 | | |
298 | | - | |
| 300 | + | |
299 | 301 | | |
300 | 302 | | |
301 | 303 | | |
| |||
558 | 560 | | |
559 | 561 | | |
560 | 562 | | |
561 | | - | |
| 563 | + | |
| 564 | + | |
562 | 565 | | |
563 | 566 | | |
564 | 567 | | |
| |||
569 | 572 | | |
570 | 573 | | |
571 | 574 | | |
572 | | - | |
573 | | - | |
| 575 | + | |
| 576 | + | |
574 | 577 | | |
575 | 578 | | |
576 | | - | |
| 579 | + | |
577 | 580 | | |
578 | 581 | | |
579 | 582 | | |
580 | 583 | | |
581 | 584 | | |
582 | 585 | | |
583 | 586 | | |
584 | | - | |
| 587 | + | |
585 | 588 | | |
586 | 589 | | |
587 | 590 | | |
| |||
720 | 723 | | |
721 | 724 | | |
722 | 725 | | |
723 | | - | |
| 726 | + | |
724 | 727 | | |
725 | 728 | | |
726 | 729 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
978 | 978 | | |
979 | 979 | | |
980 | 980 | | |
981 | | - | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
982 | 997 | | |
983 | 998 | | |
984 | 999 | | |
985 | | - | |
| 1000 | + | |
986 | 1001 | | |
987 | | - | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
988 | 1014 | | |
989 | | - | |
990 | | - | |
991 | | - | |
992 | | - | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
993 | 1020 | | |
994 | 1021 | | |
995 | | - | |
996 | | - | |
997 | | - | |
998 | | - | |
999 | | - | |
1000 | | - | |
1001 | 1022 | | |
| 1023 | + | |
| 1024 | + | |
1002 | 1025 | | |
1003 | 1026 | | |
1004 | 1027 | | |
1005 | | - | |
| 1028 | + | |
1006 | 1029 | | |
1007 | 1030 | | |
1008 | 1031 | | |
| |||
1016 | 1039 | | |
1017 | 1040 | | |
1018 | 1041 | | |
1019 | | - | |
1020 | | - | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
1021 | 1075 | | |
1022 | 1076 | | |
1023 | 1077 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
686 | 686 | | |
687 | 687 | | |
688 | 688 | | |
689 | | - | |
| 689 | + | |
| 690 | + | |
690 | 691 | | |
| 692 | + | |
691 | 693 | | |
| 694 | + | |
692 | 695 | | |
693 | 696 | | |
694 | 697 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
| 269 | + | |
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| |||
0 commit comments