On 06/21/2017 01:13 PM, Bart Van Assche wrote: > On Fri, 2017-06-16 at 16:47 -0500, Mike Christie wrote: >> In the next patches we will add tcmu netlink support that allows >> userspace to send commands to target_core_user. To execute operations >> on a se_device/tcmu_dev we need to be able to look up a dev by any old >> id. This patch replaces the se_device->dev_index with a idr created >> id. >> >> The next patches will also remove the g_device_list and replace it with >> the idr. > > Hello Mike, > > Although this patch looks fine to me I would appreciate it if all uses of > scsi_get_new_index() would be converted into IDR. It doesn't make sense to > me to use a single data structure (scsi_mib_index[]) to keep track of > indexes of HBA instances, device instances and ACL instances. > Hey Bart, I will handle this comment in a separate patchset. I am almost done and will post tomorrow when it is done testing. IDA seems like a better fit for acl and hba indexes since we do not need the lookup and iter parts, and they do not have a cyclic allocator like idr does, so wanted to add a idr.c function for that. Also, hba_id and hba_index seem like duplicates, so there is extra cleanup. -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html