From a1fde6a871b2339b75d2627264b4b2ab6d5bbce3 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Sat, 16 Mar 2013 01:18:32 +0000 Subject: [PATCH] Boost priority of HEAD OF QUEUE requests git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4799 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 88e105b5b..5c4616f12 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -3853,6 +3853,15 @@ static void blockio_exec_rw(struct vdisk_cmd_params *p, bool write, bool fua) if (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) + bio->bi_rw |= REQ_META; + bio->bi_rw |= REQ_PRIO; +#else + bio->bi_rw |= BIO_RW_META; +#endif + } + if (!hbio) hbio = tbio = bio; else