mirror of https://github.com/schoebel/mars
if: fix mars_congested() to report writes
This commit is contained in:
parent
e937cd56eb
commit
31ffd7d11e
|
@ -617,9 +617,12 @@ int mars_congested(void *data, int bdi_bits)
|
|||
struct if_input *input = data;
|
||||
int ret = 0;
|
||||
if (bdi_bits & (1 << BDI_sync_congested) &&
|
||||
atomic_read(&input->flying_count) > 0) {
|
||||
atomic_read(&input->read_flying_count) > 0) {
|
||||
ret |= (1 << BDI_sync_congested);
|
||||
|
||||
}
|
||||
if (bdi_bits & (1 << BDI_async_congested) &&
|
||||
atomic_read(&input->write_flying_count) > 0) {
|
||||
ret |= (1 << BDI_async_congested);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue