@@ -1029,7 +1029,7 @@ static bool blk_rq_should_init_elevator(struct bio *bio)
10291029 * Flush requests do not use the elevator so skip initialization.
10301030 * This allows a request to share the flush and elevator data.
10311031 */
1032- if (bio -> bi_rw & (REQ_PREFLUSH | REQ_FUA ))
1032+ if (bio -> bi_opf & (REQ_PREFLUSH | REQ_FUA ))
10331033 return false;
10341034
10351035 return true;
@@ -1504,7 +1504,7 @@ EXPORT_SYMBOL_GPL(blk_add_request_payload);
15041504bool bio_attempt_back_merge (struct request_queue * q , struct request * req ,
15051505 struct bio * bio )
15061506{
1507- const int ff = bio -> bi_rw & REQ_FAILFAST_MASK ;
1507+ const int ff = bio -> bi_opf & REQ_FAILFAST_MASK ;
15081508
15091509 if (!ll_back_merge_fn (q , req , bio ))
15101510 return false;
@@ -1526,7 +1526,7 @@ bool bio_attempt_back_merge(struct request_queue *q, struct request *req,
15261526bool bio_attempt_front_merge (struct request_queue * q , struct request * req ,
15271527 struct bio * bio )
15281528{
1529- const int ff = bio -> bi_rw & REQ_FAILFAST_MASK ;
1529+ const int ff = bio -> bi_opf & REQ_FAILFAST_MASK ;
15301530
15311531 if (!ll_front_merge_fn (q , req , bio ))
15321532 return false;
@@ -1648,8 +1648,8 @@ void init_request_from_bio(struct request *req, struct bio *bio)
16481648{
16491649 req -> cmd_type = REQ_TYPE_FS ;
16501650
1651- req -> cmd_flags |= bio -> bi_rw & REQ_COMMON_MASK ;
1652- if (bio -> bi_rw & REQ_RAHEAD )
1651+ req -> cmd_flags |= bio -> bi_opf & REQ_COMMON_MASK ;
1652+ if (bio -> bi_opf & REQ_RAHEAD )
16531653 req -> cmd_flags |= REQ_FAILFAST_MASK ;
16541654
16551655 req -> errors = 0 ;
@@ -1660,7 +1660,7 @@ void init_request_from_bio(struct request *req, struct bio *bio)
16601660
16611661static blk_qc_t blk_queue_bio (struct request_queue * q , struct bio * bio )
16621662{
1663- const bool sync = !!(bio -> bi_rw & REQ_SYNC );
1663+ const bool sync = !!(bio -> bi_opf & REQ_SYNC );
16641664 struct blk_plug * plug ;
16651665 int el_ret , rw_flags = 0 , where = ELEVATOR_INSERT_SORT ;
16661666 struct request * req ;
@@ -1681,7 +1681,7 @@ static blk_qc_t blk_queue_bio(struct request_queue *q, struct bio *bio)
16811681 return BLK_QC_T_NONE ;
16821682 }
16831683
1684- if (bio -> bi_rw & (REQ_PREFLUSH | REQ_FUA )) {
1684+ if (bio -> bi_opf & (REQ_PREFLUSH | REQ_FUA )) {
16851685 spin_lock_irq (q -> queue_lock );
16861686 where = ELEVATOR_INSERT_FLUSH ;
16871687 goto get_rq ;
@@ -1728,7 +1728,7 @@ static blk_qc_t blk_queue_bio(struct request_queue *q, struct bio *bio)
17281728 /*
17291729 * Add in META/PRIO flags, if set, before we get to the IO scheduler
17301730 */
1731- rw_flags |= (bio -> bi_rw & (REQ_META | REQ_PRIO ));
1731+ rw_flags |= (bio -> bi_opf & (REQ_META | REQ_PRIO ));
17321732
17331733 /*
17341734 * Grab a free request. This is might sleep but can not fail.
@@ -1805,7 +1805,7 @@ static void handle_bad_sector(struct bio *bio)
18051805 printk (KERN_INFO "attempt to access beyond end of device\n" );
18061806 printk (KERN_INFO "%s: rw=%d, want=%Lu, limit=%Lu\n" ,
18071807 bdevname (bio -> bi_bdev , b ),
1808- bio -> bi_rw ,
1808+ bio -> bi_opf ,
18091809 (unsigned long long )bio_end_sector (bio ),
18101810 (long long )(i_size_read (bio -> bi_bdev -> bd_inode ) >> 9 ));
18111811}
@@ -1918,9 +1918,9 @@ generic_make_request_checks(struct bio *bio)
19181918 * drivers without flush support don't have to worry
19191919 * about them.
19201920 */
1921- if ((bio -> bi_rw & (REQ_PREFLUSH | REQ_FUA )) &&
1921+ if ((bio -> bi_opf & (REQ_PREFLUSH | REQ_FUA )) &&
19221922 !test_bit (QUEUE_FLAG_WC , & q -> queue_flags )) {
1923- bio -> bi_rw &= ~(REQ_PREFLUSH | REQ_FUA );
1923+ bio -> bi_opf &= ~(REQ_PREFLUSH | REQ_FUA );
19241924 if (!nr_sectors ) {
19251925 err = 0 ;
19261926 goto end_io ;
@@ -2219,7 +2219,7 @@ unsigned int blk_rq_err_bytes(const struct request *rq)
22192219 * one.
22202220 */
22212221 for (bio = rq -> bio ; bio ; bio = bio -> bi_next ) {
2222- if ((bio -> bi_rw & ff ) != ff )
2222+ if ((bio -> bi_opf & ff ) != ff )
22232223 break ;
22242224 bytes += bio -> bi_iter .bi_size ;
22252225 }
@@ -2630,7 +2630,7 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes)
26302630 /* mixed attributes always follow the first bio */
26312631 if (req -> cmd_flags & REQ_MIXED_MERGE ) {
26322632 req -> cmd_flags &= ~REQ_FAILFAST_MASK ;
2633- req -> cmd_flags |= req -> bio -> bi_rw & REQ_FAILFAST_MASK ;
2633+ req -> cmd_flags |= req -> bio -> bi_opf & REQ_FAILFAST_MASK ;
26342634 }
26352635
26362636 /*
0 commit comments