scsi: RDMA/srpt: Rework I/O context allocation
authorBart Van Assche <bvanassche@acm.org>
Fri, 25 Jan 2019 18:34:50 +0000 (10:34 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 5 Feb 2019 02:31:37 +0000 (21:31 -0500)
commitfd1b6687091450b0ca3303c97f45ecd87401c3d7
treefd501bf5ed6adf087faf2ffa22fbf1a949f569cf
parent337ec69ed761ae02a5d1226d607c487fedbd8dd7
scsi: RDMA/srpt: Rework I/O context allocation

Instead of maintaining a list of free I/O contexts, use an sbitmap data
structure to track which I/O contexts are in use and which are free. This
makes the ib_srpt driver more consistent with other LIO drivers.

Cc: Doug Ledford <dledford@redhat.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Mike Christie <mchristi@redhat.com>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/infiniband/ulp/srpt/ib_srpt.c
drivers/infiniband/ulp/srpt/ib_srpt.h