diff options
author | Christoph Hellwig <hch@lst.de> | 2017-01-03 08:28:41 +0300 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-01-28 01:08:35 +0300 |
commit | 0a6ac4ee7c21098cb0e41cc4053b9d9ddc9e70a1 (patch) | |
tree | 54f19534fd4654192c2d9b583eb85ae97f491aa2 /drivers/scsi/scsi_priv.h | |
parent | 0fbc3e0ff623f1012e7c2af96e781eeb26bcc0d7 (diff) | |
download | linux-0a6ac4ee7c21098cb0e41cc4053b9d9ddc9e70a1.tar.xz |
scsi: respect unchecked_isa_dma for blk-mq
Currently blk-mq always allocates the sense buffer using normal GFP_KERNEL
allocation. Refactor the cmd pool code to split the cmd and sense allocation
and share the code to allocate the sense buffers as well as the sense buffer
slab caches between the legacy and blk-mq path.
Note that this switches to lazy allocation of the sense slab caches - the
slab caches (not the actual allocations) won't be destroy until the scsi
module is unloaded instead of keeping track of hosts using them.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/scsi/scsi_priv.h')
-rw-r--r-- | drivers/scsi/scsi_priv.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h index 193636a59adf..1a712c631a8b 100644 --- a/drivers/scsi/scsi_priv.h +++ b/drivers/scsi/scsi_priv.h @@ -30,6 +30,11 @@ extern void scsi_exit_hosts(void); /* scsi.c */ extern bool scsi_use_blk_mq; +void scsi_free_sense_buffer(struct Scsi_Host *shost, + unsigned char *sense_buffer); +unsigned char *scsi_alloc_sense_buffer(struct Scsi_Host *shost, gfp_t gfp_mask, + int numa_node); +int scsi_init_sense_cache(struct Scsi_Host *shost); extern int scsi_setup_command_freelist(struct Scsi_Host *shost); extern void scsi_destroy_command_freelist(struct Scsi_Host *shost); #ifdef CONFIG_SCSI_LOGGING |