@@ -567,7 +567,7 @@ static void process_prepared_mapping(struct dm_thin_new_mapping *m)
567
567
*/
568
568
r = dm_thin_insert_block (tc -> td , m -> virt_block , m -> data_block );
569
569
if (r ) {
570
- DMERR ("dm_thin_insert_block() failed" );
570
+ DMERR_LIMIT ("dm_thin_insert_block() failed" );
571
571
dm_cell_error (m -> cell );
572
572
goto out ;
573
573
}
@@ -622,7 +622,7 @@ static void process_prepared_discard(struct dm_thin_new_mapping *m)
622
622
623
623
r = dm_thin_remove_block (tc -> td , m -> virt_block );
624
624
if (r )
625
- DMERR ("dm_thin_remove_block() failed" );
625
+ DMERR_LIMIT ("dm_thin_remove_block() failed" );
626
626
627
627
process_prepared_discard_passdown (m );
628
628
}
@@ -736,7 +736,7 @@ static void schedule_copy(struct thin_c *tc, dm_block_t virt_block,
736
736
0 , copy_complete , m );
737
737
if (r < 0 ) {
738
738
mempool_free (m , pool -> mapping_pool );
739
- DMERR ("dm_kcopyd_copy() failed" );
739
+ DMERR_LIMIT ("dm_kcopyd_copy() failed" );
740
740
dm_cell_error (cell );
741
741
}
742
742
}
@@ -802,7 +802,7 @@ static void schedule_zero(struct thin_c *tc, dm_block_t virt_block,
802
802
r = dm_kcopyd_zero (pool -> copier , 1 , & to , 0 , copy_complete , m );
803
803
if (r < 0 ) {
804
804
mempool_free (m , pool -> mapping_pool );
805
- DMERR ("dm_kcopyd_zero() failed" );
805
+ DMERR_LIMIT ("dm_kcopyd_zero() failed" );
806
806
dm_cell_error (cell );
807
807
}
808
808
}
@@ -814,7 +814,7 @@ static int commit(struct pool *pool)
814
814
815
815
r = dm_pool_commit_metadata (pool -> pmd );
816
816
if (r )
817
- DMERR ("commit failed, error = %d" , r );
817
+ DMERR_LIMIT ("commit failed: error = %d" , r );
818
818
819
819
return r ;
820
820
}
@@ -997,7 +997,8 @@ static void process_discard(struct thin_c *tc, struct bio *bio)
997
997
break ;
998
998
999
999
default :
1000
- DMERR ("discard: find block unexpectedly returned %d" , r );
1000
+ DMERR_LIMIT ("%s: dm_thin_find_block() failed: error = %d" ,
1001
+ __func__ , r );
1001
1002
cell_defer_no_holder (tc , cell );
1002
1003
bio_io_error (bio );
1003
1004
break ;
@@ -1024,7 +1025,8 @@ static void break_sharing(struct thin_c *tc, struct bio *bio, dm_block_t block,
1024
1025
break ;
1025
1026
1026
1027
default :
1027
- DMERR ("%s: alloc_data_block() failed, error = %d" , __func__ , r );
1028
+ DMERR_LIMIT ("%s: alloc_data_block() failed: error = %d" ,
1029
+ __func__ , r );
1028
1030
dm_cell_error (cell );
1029
1031
break ;
1030
1032
}
@@ -1100,7 +1102,8 @@ static void provision_block(struct thin_c *tc, struct bio *bio, dm_block_t block
1100
1102
break ;
1101
1103
1102
1104
default :
1103
- DMERR ("%s: alloc_data_block() failed, error = %d" , __func__ , r );
1105
+ DMERR_LIMIT ("%s: alloc_data_block() failed: error = %d" ,
1106
+ __func__ , r );
1104
1107
set_pool_mode (tc -> pool , PM_READ_ONLY );
1105
1108
dm_cell_error (cell );
1106
1109
break ;
@@ -1148,7 +1151,8 @@ static void process_bio(struct thin_c *tc, struct bio *bio)
1148
1151
break ;
1149
1152
1150
1153
default :
1151
- DMERR ("dm_thin_find_block() failed, error = %d" , r );
1154
+ DMERR_LIMIT ("%s: dm_thin_find_block() failed: error = %d" ,
1155
+ __func__ , r );
1152
1156
cell_defer_no_holder (tc , cell );
1153
1157
bio_io_error (bio );
1154
1158
break ;
@@ -1190,7 +1194,8 @@ static void process_bio_read_only(struct thin_c *tc, struct bio *bio)
1190
1194
break ;
1191
1195
1192
1196
default :
1193
- DMERR ("dm_thin_find_block() failed, error = %d" , r );
1197
+ DMERR_LIMIT ("%s: dm_thin_find_block() failed: error = %d" ,
1198
+ __func__ , r );
1194
1199
bio_io_error (bio );
1195
1200
break ;
1196
1201
}
0 commit comments