Ticket #10946: patch-10946.diff

File patch-10946.diff, 788 bytes (added by ylee@…, 8 years ago)

Patch for 0.25. It alters the balanced I/O disk scheduler to use absolute free space as a tiebreaker if, and only if, weights are equal.

  • programs/mythbackend/scheduler.cpp

    diff -ur mythtv-0.25.2.orig/programs/mythbackend/scheduler.cpp mythtv-0.25.2/programs/mythbackend/scheduler.cpp
    old new  
    43684368}
    43694369
    43704370// prefer dirs with less weight (disk I/O) over dirs with more weight
     4371// if weights are equal, prefer dirs with more absolute free space
     4372// over less
    43714373static bool comp_storage_disk_io(FileSystemInfo *a, FileSystemInfo *b)
    43724374{
    43734375    if (a->getWeight() < b->getWeight())
     4376    {
    43744377        return true;
     4378    }
     4379    else if (a->getWeight() == b->getWeight())
     4380    {
     4381        if (a->getFreeSpace() > b->getFreeSpace())
     4382            return true;
     4383    }
    43754384
    43764385    return false;
    43774386}