mirror of https://github.com/schoebel/mars
if: adapt to renamed congestion handling (kernel 4.2)
This commit is contained in:
parent
275cc2a195
commit
d04e8e23c4
|
@ -771,6 +771,17 @@ int mars_congested(void *data, int bdi_bits)
|
|||
{
|
||||
struct if_input *input = data;
|
||||
int ret = 0;
|
||||
|
||||
#ifdef WB_STAT_BATCH /* changed by 4452226ea276e74fc3e252c88d9bb7e8f8e44bf0 */
|
||||
if (bdi_bits & (1 << WB_sync_congested) &&
|
||||
atomic_read(&input->read_flying_count) > 0) {
|
||||
ret |= (1 << WB_sync_congested);
|
||||
}
|
||||
if (bdi_bits & (1 << WB_async_congested) &&
|
||||
atomic_read(&input->write_flying_count) > 0) {
|
||||
ret |= (1 << WB_async_congested);
|
||||
}
|
||||
#else /* old code */
|
||||
if (bdi_bits & (1 << BDI_sync_congested) &&
|
||||
atomic_read(&input->read_flying_count) > 0) {
|
||||
ret |= (1 << BDI_sync_congested);
|
||||
|
@ -779,6 +790,7 @@ int mars_congested(void *data, int bdi_bits)
|
|||
atomic_read(&input->write_flying_count) > 0) {
|
||||
ret |= (1 << BDI_async_congested);
|
||||
}
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue