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.