On Wed, Nov 10, 2010 at 8:03 AM, Yi Zou <[email protected]> wrote:
> commit 137c34f8 adds pool alloc/release counter, which should be reset to
> 0 when the pool is being reset, otherwise it gets too noisy for previously
> warned mismatch of the two counters.
>
> Signed-off-by: Yi Zou <[email protected]>
> ---
>
>  drivers/scsi/libfc/fc_exch.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
> index b7935e7..b50eb61 100644
> --- a/drivers/scsi/libfc/fc_exch.c
> +++ b/drivers/scsi/libfc/fc_exch.c
> @@ -1736,12 +1736,15 @@ restart:
>                }
>        }
>
> -       if (atomic_read(&pool->allocated) != atomic_read(&pool->released))
> +       if (atomic_read(&pool->allocated) != atomic_read(&pool->released)) {
>                printk(KERN_WARNING "libfc: host %u exch pool %p "
>                        "allocated %d released %d\n",
>                        lport->host->host_no, pool,
>                        atomic_read(&pool->allocated),
>                        atomic_read(&pool->released));
> +               atomic_set(&pool->allocated, 0);
> +               atomic_set(&pool->released, 0);
> +       }
>
>        spin_unlock_bh(&pool->lock);
>  }
>
>
The work looks fine, thanks.

Reviewed-by: Hillf Danton <[email protected]>
_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel

Reply via email to