diff --git a/kernel/compat.h b/kernel/compat.h index 4ceeee55..3457d0c5 100644 --- a/kernel/compat.h +++ b/kernel/compat.h @@ -130,6 +130,13 @@ extern int _compat_unlink( #ifndef BIO_UPTODATE #define NEED_BIO_SPLIT #endif +/* Adapt to modification of blk_queue_split() in + * af67c31fba3b879b241536a48df703a2eee18ebf + * detected via f4560ffe8cec1361b1021d81aca6a4173f8e7c87 + */ +#ifdef QUEUE_FLAG_QUIESCED +#define MARS_HAS_BIO_SPLIT2 +#endif /* adapt to 4e1b2d52a80d79296a5d899d73249748dea71a53 and many others */ #ifdef bio_op diff --git a/kernel/mars_if.c b/kernel/mars_if.c index 2fb80e57..defc5c9a 100644 --- a/kernel/mars_if.c +++ b/kernel/mars_if.c @@ -899,7 +899,11 @@ blk_qc_t if_make_request(struct request_queue *q, struct bio *bio) void if_make_request(struct request_queue *q, struct bio *bio) #endif { +#ifdef MARS_HAS_BIO_SPLIT2 + blk_queue_split(q, &bio); +#else blk_queue_split(q, &bio, q->bio_split); +#endif #ifdef BLK_QC_T_NONE return _if_make_request(q, bio); #else