aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2008-06-05 23:30:03 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-07-12 09:22:24 -0400
commit6362abd3e00d3161affad996fa53cc69a01fc6d1 (patch)
tree39dd25d3cfa8147586596042bbfc9a6adf61d68d /drivers/scsi
parent090507157f3bc43dd925fda50f8aca7d03b616b6 (diff)
[SCSI] Rename scsi_bidi_sdb_cache
The data integrity changes need to dynamically allocate scsi_data_buffers too. Rename scsi_bidi_sdb_cache for clarity. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/scsi_lib.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 033c58a65f50..aa8d5de58839 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -65,7 +65,7 @@ static struct scsi_host_sg_pool scsi_sg_pools[] = {
65}; 65};
66#undef SP 66#undef SP
67 67
68static struct kmem_cache *scsi_bidi_sdb_cache; 68static struct kmem_cache *scsi_sdb_cache;
69 69
70static void scsi_run_queue(struct request_queue *q); 70static void scsi_run_queue(struct request_queue *q);
71 71
@@ -775,7 +775,7 @@ void scsi_release_buffers(struct scsi_cmnd *cmd)
775 struct scsi_data_buffer *bidi_sdb = 775 struct scsi_data_buffer *bidi_sdb =
776 cmd->request->next_rq->special; 776 cmd->request->next_rq->special;
777 scsi_free_sgtable(bidi_sdb); 777 scsi_free_sgtable(bidi_sdb);
778 kmem_cache_free(scsi_bidi_sdb_cache, bidi_sdb); 778 kmem_cache_free(scsi_sdb_cache, bidi_sdb);
779 cmd->request->next_rq->special = NULL; 779 cmd->request->next_rq->special = NULL;
780 } 780 }
781} 781}
@@ -1050,7 +1050,7 @@ int scsi_init_io(struct scsi_cmnd *cmd, gfp_t gfp_mask)
1050 1050
1051 if (blk_bidi_rq(cmd->request)) { 1051 if (blk_bidi_rq(cmd->request)) {
1052 struct scsi_data_buffer *bidi_sdb = kmem_cache_zalloc( 1052 struct scsi_data_buffer *bidi_sdb = kmem_cache_zalloc(
1053 scsi_bidi_sdb_cache, GFP_ATOMIC); 1053 scsi_sdb_cache, GFP_ATOMIC);
1054 if (!bidi_sdb) { 1054 if (!bidi_sdb) {
1055 error = BLKPREP_DEFER; 1055 error = BLKPREP_DEFER;
1056 goto err_exit; 1056 goto err_exit;
@@ -1692,11 +1692,11 @@ int __init scsi_init_queue(void)
1692 return -ENOMEM; 1692 return -ENOMEM;
1693 } 1693 }
1694 1694
1695 scsi_bidi_sdb_cache = kmem_cache_create("scsi_bidi_sdb", 1695 scsi_sdb_cache = kmem_cache_create("scsi_data_buffer",
1696 sizeof(struct scsi_data_buffer), 1696 sizeof(struct scsi_data_buffer),
1697 0, 0, NULL); 1697 0, 0, NULL);
1698 if (!scsi_bidi_sdb_cache) { 1698 if (!scsi_sdb_cache) {
1699 printk(KERN_ERR "SCSI: can't init scsi bidi sdb cache\n"); 1699 printk(KERN_ERR "SCSI: can't init scsi sdb cache\n");
1700 goto cleanup_io_context; 1700 goto cleanup_io_context;
1701 } 1701 }
1702 1702
@@ -1709,7 +1709,7 @@ int __init scsi_init_queue(void)
1709 if (!sgp->slab) { 1709 if (!sgp->slab) {
1710 printk(KERN_ERR "SCSI: can't init sg slab %s\n", 1710 printk(KERN_ERR "SCSI: can't init sg slab %s\n",
1711 sgp->name); 1711 sgp->name);
1712 goto cleanup_bidi_sdb; 1712 goto cleanup_sdb;
1713 } 1713 }
1714 1714
1715 sgp->pool = mempool_create_slab_pool(SG_MEMPOOL_SIZE, 1715 sgp->pool = mempool_create_slab_pool(SG_MEMPOOL_SIZE,
@@ -1717,13 +1717,13 @@ int __init scsi_init_queue(void)
1717 if (!sgp->pool) { 1717 if (!sgp->pool) {
1718 printk(KERN_ERR "SCSI: can't init sg mempool %s\n", 1718 printk(KERN_ERR "SCSI: can't init sg mempool %s\n",
1719 sgp->name); 1719 sgp->name);
1720 goto cleanup_bidi_sdb; 1720 goto cleanup_sdb;
1721 } 1721 }
1722 } 1722 }
1723 1723
1724 return 0; 1724 return 0;
1725 1725
1726cleanup_bidi_sdb: 1726cleanup_sdb:
1727 for (i = 0; i < SG_MEMPOOL_NR; i++) { 1727 for (i = 0; i < SG_MEMPOOL_NR; i++) {
1728 struct scsi_host_sg_pool *sgp = scsi_sg_pools + i; 1728 struct scsi_host_sg_pool *sgp = scsi_sg_pools + i;
1729 if (sgp->pool) 1729 if (sgp->pool)
@@ -1731,7 +1731,7 @@ cleanup_bidi_sdb:
1731 if (sgp->slab) 1731 if (sgp->slab)
1732 kmem_cache_destroy(sgp->slab); 1732 kmem_cache_destroy(sgp->slab);
1733 } 1733 }
1734 kmem_cache_destroy(scsi_bidi_sdb_cache); 1734 kmem_cache_destroy(scsi_sdb_cache);
1735cleanup_io_context: 1735cleanup_io_context:
1736 kmem_cache_destroy(scsi_io_context_cache); 1736 kmem_cache_destroy(scsi_io_context_cache);
1737 1737
@@ -1743,7 +1743,7 @@ void scsi_exit_queue(void)
1743 int i; 1743 int i;
1744 1744
1745 kmem_cache_destroy(scsi_io_context_cache); 1745 kmem_cache_destroy(scsi_io_context_cache);
1746 kmem_cache_destroy(scsi_bidi_sdb_cache); 1746 kmem_cache_destroy(scsi_sdb_cache);
1747 1747
1748 for (i = 0; i < SG_MEMPOOL_NR; i++) { 1748 for (i = 0; i < SG_MEMPOOL_NR; i++) {
1749 struct scsi_host_sg_pool *sgp = scsi_sg_pools + i; 1749 struct scsi_host_sg_pool *sgp = scsi_sg_pools + i;