File tree Expand file tree Collapse file tree 2 files changed +1
-25
lines changed Expand file tree Collapse file tree 2 files changed +1
-25
lines changed Original file line number Diff line number Diff line change @@ -1101,22 +1101,8 @@ static int extent_ptr_invalid(struct bch_fs *c,
1101
1101
bool metadata ,
1102
1102
struct printbuf * err )
1103
1103
{
1104
- struct bkey_ptrs_c ptrs = bch2_bkey_ptrs_c (k );
1105
1104
int ret = 0 ;
1106
1105
1107
- if (!bch2_dev_exists (c , ptr -> dev )) {
1108
- /*
1109
- * If we're in the write path this key might have already been
1110
- * overwritten, and we could be seeing a device that doesn't
1111
- * exist anymore due to racing with device removal:
1112
- */
1113
- if (flags & BKEY_INVALID_WRITE )
1114
- return 0 ;
1115
-
1116
- bkey_fsck_err (c , err , ptr_to_invalid_device ,
1117
- "pointer to invalid device (%u)" , ptr -> dev );
1118
- }
1119
-
1120
1106
rcu_read_lock ();
1121
1107
struct bch_dev * ca = bch2_dev_rcu (c , ptr -> dev );
1122
1108
if (!ca ) {
@@ -1130,6 +1116,7 @@ static int extent_ptr_invalid(struct bch_fs *c,
1130
1116
unsigned bucket_size = ca -> mi .bucket_size ;
1131
1117
rcu_read_unlock ();
1132
1118
1119
+ struct bkey_ptrs_c ptrs = bch2_bkey_ptrs_c (k );
1133
1120
bkey_for_each_ptr (ptrs , ptr2 )
1134
1121
bkey_fsck_err_on (ptr != ptr2 && ptr -> dev == ptr2 -> dev , c , err ,
1135
1122
ptr_to_duplicate_device ,
Original file line number Diff line number Diff line change @@ -690,7 +690,6 @@ static int journal_entry_dev_usage_validate(struct bch_fs *c,
690
690
container_of (entry , struct jset_entry_dev_usage , entry );
691
691
unsigned bytes = jset_u64s (le16_to_cpu (entry -> u64s )) * sizeof (u64 );
692
692
unsigned expected = sizeof (* u );
693
- unsigned dev ;
694
693
int ret = 0 ;
695
694
696
695
if (journal_entry_err_on (bytes < expected ,
@@ -702,16 +701,6 @@ static int journal_entry_dev_usage_validate(struct bch_fs *c,
702
701
return ret ;
703
702
}
704
703
705
- dev = le32_to_cpu (u -> dev );
706
-
707
- if (journal_entry_err_on (!bch2_dev_exists (c , dev ),
708
- c , version , jset , entry ,
709
- journal_entry_dev_usage_bad_dev ,
710
- "bad dev" )) {
711
- journal_entry_null_range (entry , vstruct_next (entry ));
712
- return ret ;
713
- }
714
-
715
704
if (journal_entry_err_on (u -> pad ,
716
705
c , version , jset , entry ,
717
706
journal_entry_dev_usage_bad_pad ,
You can’t perform that action at this time.
0 commit comments