Re: [PATCH V3 07/20] block: prevent adding/deleting disk during updating nr_hw_queues

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

 



On Thu, Apr 24, 2025 at 11:21:30PM +0800, Ming Lei wrote:
> +	init_rwsem(&set->update_nr_hwq_sema);

Can you please call this update_nr_hwq_lock instead?  _sema is a very
unusual naming for a rw semaphore.

>   * This function registers the partitioning information in @disk
>   * with the kernel. Also attach a fwnode to the disk device.
>   */
> -int __must_check add_disk_fwnode(struct device *parent, struct gendisk *disk,
> -				 const struct attribute_group **groups,
> -				 struct fwnode_handle *fwnode)
> +static int __add_disk_fwnode(struct device *parent, struct gendisk *disk,
> +			     const struct attribute_group **groups,
> +			     struct fwnode_handle *fwnode)

once this becomes internal there is no need for the _fwnode postfix and
this can simply become __add_disk.

This probably wants a lockdep assert that te nr_hwq lock is held for the
blk-mq case.

Also when you use two-tab indentation for the arguments you don't need to
reformat for every little naming change.

Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux