]> rtime.felk.cvut.cz Git - frescor/frsh.git/blobdiff - resources/disk_bfq/lib/diskbfq_fra.c
disk_bfq: Set ioprio directly without regard to the contract
[frescor/frsh.git] / resources / disk_bfq / lib / diskbfq_fra.c
index 589a08de7f51c14c7dc21d2e5ff5cd4c48b4b062..14e54bac5df3ee21d823ab7191c7326eaf82b6fd 100644 (file)
@@ -154,11 +154,12 @@ int fra_DISK_bind_thread
 {
        fres_block_basic *b;
        int ret, ioprio = *((int*)vres->priv);
-       struct fres_contract *contract = vres->perceived;
+       struct fres_contract *contract = vres->allocated;
 
        b = fres_contract_get_basic(contract);
        if (b->contract_type == FRSH_CT_REGULAR)
-           ioprio = DISKBFQ_IOPRIO_DEFAULT;
+               /* Hack: frm_diskbfq calculates wrong ioprio (-1) - override it here */
+               ioprio = IOPRIO_CLASS_RT << IOPRIO_CLASS_SHIFT | 7;
        else if (b->contract_type == FRSH_CT_BACKGROUND)
                 ioprio |= IOPRIO_CLASS_IDLE << IOPRIO_CLASS_SHIFT;
        else