]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
[SCSI] zfcp: Update status read mempool
authorChristof Schmitt <christof.schmitt@de.ibm.com>
Mon, 21 Jun 2010 08:11:33 +0000 (10:11 +0200)
committerJames Bottomley <James.Bottomley@suse.de>
Wed, 21 Jul 2010 22:05:09 +0000 (15:05 -0700)
Commit 64deb6efdc5504ce97b5c1c6f281fffbc150bd93 changed the way status
read buffers are handled but forgot to adjust the mempool to the new
size. Add the call to resize the mempool after the exchange config
data. Also use the define instead of the hard coded number in the fsf
callback for consistency.

Reviewed-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/s390/scsi/zfcp_erp.c
drivers/s390/scsi/zfcp_fsf.c

index e3dbeda97179bccc814e424c705a53255ef61f54..fd068bc1bd0a11e5f7f698efa4d84f52a4df3073 100644 (file)
@@ -714,6 +714,14 @@ static int zfcp_erp_adapter_strategy_open_fsf(struct zfcp_erp_action *act)
        if (zfcp_erp_adapter_strategy_open_fsf_xport(act) == ZFCP_ERP_FAILED)
                return ZFCP_ERP_FAILED;
 
+       if (mempool_resize(act->adapter->pool.status_read_data,
+                          act->adapter->stat_read_buf_num, GFP_KERNEL))
+               return ZFCP_ERP_FAILED;
+
+       if (mempool_resize(act->adapter->pool.status_read_req,
+                          act->adapter->stat_read_buf_num, GFP_KERNEL))
+               return ZFCP_ERP_FAILED;
+
        atomic_set(&act->adapter->stat_miss, act->adapter->stat_read_buf_num);
        if (zfcp_status_read_refill(act->adapter))
                return ZFCP_ERP_FAILED;
index 229795f190e8f6dd6498428f027d43928e59f61a..71663fb77310b5a51a9331d7210b978a444dd707 100644 (file)
@@ -496,7 +496,8 @@ static int zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *req)
 
        adapter->hydra_version = bottom->adapter_type;
        adapter->timer_ticks = bottom->timer_interval;
-       adapter->stat_read_buf_num = max(bottom->status_read_buf_num, (u16)16);
+       adapter->stat_read_buf_num = max(bottom->status_read_buf_num,
+                                        (u16)FSF_STATUS_READS_RECOM);
 
        if (fc_host_permanent_port_name(shost) == -1)
                fc_host_permanent_port_name(shost) = fc_host_port_name(shost);