Re: [PATCH] scsi: core: reallocate scsi device's budget map if default queue depth is changed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/25/22 20:17, Ming Lei wrote:
+static int scsi_realloc_sdev_budget_map(struct scsi_device *sdev,
+					unsigned int depth)
+{
+	int new_shift = sbitmap_calculate_shift(depth);
+	bool need_alloc = !sdev->budget_map.map;
+	bool need_free = false;
+	int ret;
+	struct sbitmap sb_back;

To me the variable name "sb_back" looks confusing. Consider renaming this variable into "sb_backup" or "previous_sb".

+	/*
+	 * Request queue has to be freezed for reallocating budget map,
                                   ^^^^^^^
                                   frozen?
+	 * and here disk isn't added yet, so freezing is pretty fast
+	 */

Otherwise this patch looks good to me.

Thanks,

Bart.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux