Commit 8cc0e50
Kent Overstreet
bcachefs: Fix "trying to move an extent, but nr_replicas=0"
data_update_init() does a bunch of complicated stuff to decide how many
replicas to add, since we only want to increase an extent's durability
on an explicit rereplicate, but extent pointers may be on devices with
different durability settings.
There was a corner case when evacuating a device that had been set to
durability=0 after data had been written to it, and extents on that
device had already been rereplicated - then evacuate only needs to drop
pointers on that device, not move them.
So the assert for !m->op.nr_replicas was spurious; this was a perfectly
legitimate case that needed to be handled.
Signed-off-by: Kent Overstreet <[email protected]>1 parent 3f53d05 commit 8cc0e50
1 file changed
+12
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
695 | 695 | | |
696 | 696 | | |
697 | 697 | | |
698 | | - | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
705 | | - | |
706 | | - | |
707 | | - | |
708 | 698 | | |
709 | 699 | | |
710 | 700 | | |
| |||
716 | 706 | | |
717 | 707 | | |
718 | 708 | | |
719 | | - | |
720 | | - | |
| 709 | + | |
721 | 710 | | |
722 | | - | |
723 | | - | |
724 | | - | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
725 | 722 | | |
726 | 723 | | |
727 | 724 | | |
728 | | - | |
729 | | - | |
730 | 725 | | |
731 | 726 | | |
732 | 727 | | |
| |||
0 commit comments