Re: [PATCH] block: Cleanup set_capacity()/bdev_set_nr_sectors()

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

 



On Fri, Apr 21, 2023 at 01:31:01PM +0900, Damien Le Moal wrote:
> The code for setting a block device capacity (bd_nr_sectors field of
> struct block_device) is duplicated in set_capacity() and
> bdev_set_nr_sectors(). Clean this up by turning set_capacity() into an
> inline function calling bdev_set_nr_sectors() and move
> bdev_set_nr_sectors() code to block/bdev.c instead of having this
> function in block/partitions/core.c.

I don't think bdev_set_nr_sectors should be exported.  So given that
all this is a slow path anyway, please keep set_capacity out of
line as well and don't export bdev_set_nr_sectors.



[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