Linux 4.8 compat: REQ_OP and bio_set_op_attrs()

New REQ_OP_* definitions have been introduced to separate the
WRITE, READ, and DISCARD operations from the flags.  This included
changing the encoding of bi_rw.  It places REQ_OP_* in high order
bits and other stuff in low order bits.  This encoding is done
through the new helper function bio_set_op_attrs.  For complete
details refer to:

https://github.com/torvalds/linux/commit/f215082
https://github.com/torvalds/linux/commit/4e1b2d5

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #4892
Closes #4899
This commit is contained in:
Chunwei Chen
2016-07-27 17:55:32 +00:00
committed by Brian Behlendorf
parent 76e5f6fe10
commit 3b86aeb295
3 changed files with 51 additions and 29 deletions
+1 -1
View File
@@ -812,7 +812,7 @@ zvol_request(struct request_queue *q, struct bio *bio)
goto out2;
}
if (bio->bi_rw & VDEV_REQ_DISCARD) {
if (bio_is_discard(bio)) {
error = zvol_discard(bio);
goto out2;
}