mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-22 05:01:27 +00:00
REQ_META build fix for kernels 2.6.36..3.0
The SCST trunk currently doesn't build against any of the kernels in the range 2.6.36..3.0. The patch below fixes that. Signed-off-by: Bart Van Assche <bvanassche@acm.org> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4805 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -3854,10 +3854,22 @@ static void blockio_exec_rw(struct vdisk_cmd_params *p, bool write, bool fua)
|
||||
bio->bi_rw |= REQ_FUA;
|
||||
|
||||
if (cmd->queue_type == SCST_CMD_QUEUE_HEAD_OF_QUEUE) {
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) || \
|
||||
defined(RHEL_MAJOR) && RHEL_MAJOR -0 >= 6
|
||||
bio->bi_rw |= REQ_META;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
|
||||
/*
|
||||
* Priority boosting was separated
|
||||
* from REQ_META in commit 65299a3b
|
||||
* (kernel 3.1.0).
|
||||
*/
|
||||
bio->bi_rw |= REQ_PRIO;
|
||||
#else
|
||||
#endif
|
||||
#elif !defined(RHEL_MAJOR) || RHEL_MAJOR -0 >= 6
|
||||
/*
|
||||
* BIO_* and REQ_* flags were unified
|
||||
* in commit 7b6d91da (kernel 2.6.36).
|
||||
*/
|
||||
bio->bi_rw |= BIO_RW_META;
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user