mirror of https://github.com/schoebel/mars
if: adapt to BIO_THROTTLED
This commit is contained in:
parent
8ff8b9609c
commit
93d7ed2a3d
|
@ -136,6 +136,12 @@ extern int _compat_unlink(
|
|||
#define MARS_HAS_NEW_BIO_OP
|
||||
#endif
|
||||
|
||||
/* adapt to 8d2bbd4c8236e9e38e6b36ac9e2c54fdcfe5b335
|
||||
*/
|
||||
#ifdef BIO_THROTTLED
|
||||
#define MARS_HAS_BIO_THROTTLED
|
||||
#endif
|
||||
|
||||
/* IO accounting */
|
||||
|
||||
/* adapt to 394ffa503bc40e32d7f54a9b817264e81ce131b4
|
||||
|
|
|
@ -442,7 +442,11 @@ void if_make_request(struct request_queue *q, struct bio *bio)
|
|||
const bool unplug = false;
|
||||
const bool meta = _flagged(REQ_META);
|
||||
const bool discard = bio_op(bio) == REQ_OP_DISCARD;
|
||||
#ifdef MARS_HAS_BIO_THROTTLED
|
||||
const bool noidle = bio_flagged(bio, BIO_THROTTLED);
|
||||
#else
|
||||
const bool noidle = _flagged(REQ_THROTTLED);
|
||||
#endif
|
||||
// remove_this
|
||||
#else
|
||||
#error Cannot decode the bio flags
|
||||
|
|
Loading…
Reference in New Issue