@@ -1968,12 +1968,12 @@ static void end_sync_write(struct bio *bio)
1968
1968
}
1969
1969
1970
1970
static int r1_sync_page_io (struct md_rdev * rdev , sector_t sector ,
1971
- int sectors , struct page * page , int rw )
1971
+ int sectors , struct page * page , blk_opf_t rw )
1972
1972
{
1973
1973
if (sync_page_io (rdev , sector , sectors << 9 , page , rw , false))
1974
1974
/* success */
1975
1975
return 1 ;
1976
- if (rw == WRITE ) {
1976
+ if (rw == REQ_OP_WRITE ) {
1977
1977
set_bit (WriteErrorSeen , & rdev -> flags );
1978
1978
if (!test_and_set_bit (WantReplacement ,
1979
1979
& rdev -> flags ))
@@ -2090,7 +2090,7 @@ static int fix_sync_read_error(struct r1bio *r1_bio)
2090
2090
rdev = conf -> mirrors [d ].rdev ;
2091
2091
if (r1_sync_page_io (rdev , sect , s ,
2092
2092
pages [idx ],
2093
- WRITE ) == 0 ) {
2093
+ REQ_OP_WRITE ) == 0 ) {
2094
2094
r1_bio -> bios [d ]-> bi_end_io = NULL ;
2095
2095
rdev_dec_pending (rdev , mddev );
2096
2096
}
@@ -2105,7 +2105,7 @@ static int fix_sync_read_error(struct r1bio *r1_bio)
2105
2105
rdev = conf -> mirrors [d ].rdev ;
2106
2106
if (r1_sync_page_io (rdev , sect , s ,
2107
2107
pages [idx ],
2108
- READ ) != 0 )
2108
+ REQ_OP_READ ) != 0 )
2109
2109
atomic_add (s , & rdev -> corrected_errors );
2110
2110
}
2111
2111
sectors -= s ;
@@ -2321,7 +2321,7 @@ static void fix_read_error(struct r1conf *conf, struct r1bio *r1_bio)
2321
2321
!test_bit (Faulty , & rdev -> flags )) {
2322
2322
atomic_inc (& rdev -> nr_pending );
2323
2323
r1_sync_page_io (rdev , sect , s ,
2324
- conf -> tmppage , WRITE );
2324
+ conf -> tmppage , REQ_OP_WRITE );
2325
2325
rdev_dec_pending (rdev , mddev );
2326
2326
}
2327
2327
}
@@ -2335,7 +2335,7 @@ static void fix_read_error(struct r1conf *conf, struct r1bio *r1_bio)
2335
2335
!test_bit (Faulty , & rdev -> flags )) {
2336
2336
atomic_inc (& rdev -> nr_pending );
2337
2337
if (r1_sync_page_io (rdev , sect , s ,
2338
- conf -> tmppage , READ )) {
2338
+ conf -> tmppage , REQ_OP_READ )) {
2339
2339
atomic_add (s , & rdev -> corrected_errors );
2340
2340
pr_info ("md/raid1:%s: read error corrected (%d sectors at %llu on %pg)\n" ,
2341
2341
mdname (mddev ), s ,
0 commit comments