mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix devstat on md devices.
devstat_end_transaction() was called before the i/o was actually ended (by delivering it to GEOM), so at least the i/o length was messed up. It was always recorded as 0, so the average transaction size and the average transfer rate was always displayed as 0. devstat_end_transaction() was not called at all for the error case, so there were sometimes multiple starts per end. I didn't observe this in practice and don't know if it did much damage. I think it extended the length of the i/o to the next transaction. Reviewed by: kib
This commit is contained in:
parent
25b4f9ad69
commit
dac6a0d559
1 changed files with 2 additions and 2 deletions
|
|
@ -1241,10 +1241,10 @@ md_kthread(void *arg)
|
|||
|
||||
if (error != -1) {
|
||||
bp->bio_completed = bp->bio_length;
|
||||
if ((bp->bio_cmd == BIO_READ) || (bp->bio_cmd == BIO_WRITE))
|
||||
devstat_end_transaction_bio(sc->devstat, bp);
|
||||
g_io_deliver(bp, error);
|
||||
}
|
||||
if (bp->bio_cmd == BIO_READ || bp->bio_cmd == BIO_WRITE)
|
||||
devstat_end_transaction_bio(sc->devstat, bp);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue