/* Description: @rq is about to be mixed merged. Make sure the attributes which can be mixed are set in each bio and mark @rq as mixed merged.  */
void blk_rq_set_mixed_merge(struct request *rq)
/* Description: @rq is about to be mixed merged. Make sure the attributes which can be mixed are set in each bio and mark @rq as mixed merged.  */
void blk_rq_set_mixed_merge(struct request *rq)
{
	unsigned int ff = rq->cmd_flags & REQ_FAILFAST_MASK;
	struct bio *bio;
	if (rq->cmd_flags & REQ_MIXED_MERGE)
		return;
	for (bio = rq->bio; bio; bio = bio->bi_next) {
		WARN_ON_ONCE((bio->bi_rw & REQ_FAILFAST_MASK) &&
			     (bio->bi_rw & REQ_FAILFAST_MASK) != ff);
		bio->bi_rw |= ff;
	}
	rq->cmd_flags |= REQ_MIXED_MERGE;
}