File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -528,6 +528,9 @@ int bch2_gc_accounting_done(struct bch_fs *c)
528
528
struct disk_accounting_pos acc_k ;
529
529
bpos_to_disk_accounting_pos (& acc_k , e -> pos );
530
530
531
+ if (acc_k .type >= BCH_DISK_ACCOUNTING_TYPE_NR )
532
+ continue ;
533
+
531
534
u64 src_v [BCH_ACCOUNTING_MAX_COUNTERS ];
532
535
u64 dst_v [BCH_ACCOUNTING_MAX_COUNTERS ];
533
536
@@ -760,6 +763,12 @@ void bch2_verify_accounting_clean(struct bch_fs *c)
760
763
struct bkey_s_c_accounting a = bkey_s_c_to_accounting (k );
761
764
unsigned nr = bch2_accounting_counters (k .k );
762
765
766
+ struct disk_accounting_pos acc_k ;
767
+ bpos_to_disk_accounting_pos (& acc_k , k .k -> p );
768
+
769
+ if (acc_k .type >= BCH_DISK_ACCOUNTING_TYPE_NR )
770
+ continue ;
771
+
763
772
bch2_accounting_mem_read (c , k .k -> p , v , nr );
764
773
765
774
if (memcmp (a .v -> d , v , nr * sizeof (u64 ))) {
@@ -775,9 +784,6 @@ void bch2_verify_accounting_clean(struct bch_fs *c)
775
784
mismatch = true;
776
785
}
777
786
778
- struct disk_accounting_pos acc_k ;
779
- bpos_to_disk_accounting_pos (& acc_k , a .k -> p );
780
-
781
787
switch (acc_k .type ) {
782
788
case BCH_DISK_ACCOUNTING_persistent_reserved :
783
789
base .reserved += acc_k .persistent_reserved .nr_replicas * a .v -> d [0 ];
You can’t perform that action at this time.
0 commit comments