mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 09:10:28 +00:00
mpi3mr: Track IO per target counter during queue poll with local variable
Reviewed by: imp Approved by: imp Differential revision: https://reviews.freebsd.org/D44494
This commit is contained in:
parent
3f3a15543a
commit
8d3c3b5242
|
@ -1839,6 +1839,7 @@ int mpi3mr_remove_device_from_os(struct mpi3mr_softc *sc, U16 handle)
|
||||||
{
|
{
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
struct mpi3mr_target *target;
|
struct mpi3mr_target *target;
|
||||||
|
unsigned int target_outstanding;
|
||||||
|
|
||||||
mpi3mr_dprint(sc, MPI3MR_EVENT,
|
mpi3mr_dprint(sc, MPI3MR_EVENT,
|
||||||
"Removing Device (dev_handle: %d)\n", handle);
|
"Removing Device (dev_handle: %d)\n", handle);
|
||||||
|
@ -1856,15 +1857,16 @@ int mpi3mr_remove_device_from_os(struct mpi3mr_softc *sc, U16 handle)
|
||||||
|
|
||||||
target->flags |= MPI3MRSAS_TARGET_INREMOVAL;
|
target->flags |= MPI3MRSAS_TARGET_INREMOVAL;
|
||||||
|
|
||||||
if (mpi3mr_atomic_read(&target->outstanding)) {
|
target_outstanding = mpi3mr_atomic_read(&target->outstanding);
|
||||||
|
if (target_outstanding) {
|
||||||
mpi3mr_dprint(sc, MPI3MR_ERROR, "there are [%2d] outstanding IOs on target: %d "
|
mpi3mr_dprint(sc, MPI3MR_ERROR, "there are [%2d] outstanding IOs on target: %d "
|
||||||
"Poll reply queue once\n", mpi3mr_atomic_read(&target->outstanding),
|
"Poll reply queue once\n", target_outstanding, target->per_id);
|
||||||
target->per_id);
|
|
||||||
mpi3mr_poll_pend_io_completions(sc);
|
mpi3mr_poll_pend_io_completions(sc);
|
||||||
if (mpi3mr_atomic_read(&target->outstanding))
|
target_outstanding = mpi3mr_atomic_read(&target->outstanding);
|
||||||
|
if (target_outstanding)
|
||||||
|
target_outstanding = mpi3mr_atomic_read(&target->outstanding);
|
||||||
mpi3mr_dprint(sc, MPI3MR_ERROR, "[%2d] outstanding IOs present on target: %d "
|
mpi3mr_dprint(sc, MPI3MR_ERROR, "[%2d] outstanding IOs present on target: %d "
|
||||||
"despite poll\n", mpi3mr_atomic_read(&target->outstanding),
|
"despite poll\n", target_outstanding, target->per_id);
|
||||||
target->per_id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (target->exposed_to_os && !sc->reset_in_progress) {
|
if (target->exposed_to_os && !sc->reset_in_progress) {
|
||||||
|
|
Loading…
Reference in a new issue