]> rtime.felk.cvut.cz Git - frescor/frsh.git/commitdiff
disk_bfq: Set ioprio directly without regard to the contract
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 14 May 2010 18:28:57 +0000 (20:28 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 14 May 2010 18:28:57 +0000 (20:28 +0200)
There is some problem with calculation of ioprio values, so we set it
to a fixed value.

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