Re: [PATCH] block: remove bdev_nonrot()

Damien Le Moal <[email protected]>
Newsgroups gmane.comp.file-systems.ext4,gmane.linux.block,gmane.linux.raid,gmane.linux.scsi,gmane.linux.scsi.target.devel,gmane.comp.file-systems.btrfs,gmane.linux.kernel.mm
Organization Western Digital Research
Message-ID <[email protected]>
On 2/26/26 19:04, Paul Menzel wrote:
> Dear Damien,
> 
> 
> Thank you for your patch.
> 
> 
> Am 26.02.26 um 08:54 schrieb Damien Le Moal:
>> bdev_nonrot() is simply the negative return value of bdev_rot().
>> So replace all call sites of bdev_nonrot() with calls to bdev_rot()
>> and remove bdev_nonrot().
> 
> Is the generated code different now?

I did not check but I doubt there is any difference at all.

This is more about having a single helper function for bdevs that is consistent
with the helper for request queues (blk_queue_rot()) which directly reflects the
setting of a block device BLK_FEAT_ROTATIONAL queue feature. This way is also in
my opinion simpler as you do not get your brain overheating when seeing things
like "!bdev_nonrot()" :)
  > Is it worth the change, as it looks quite subjective if you prefer the
> one or the other way?

I think it is a nice cleanup, but I will let Jens and other maintainers decide
on the worth of this patch.

> My point above aside, the diff looks good.
> 
> Reviewed-by: Paul Menzel <[email protected]>

Thanks.

-- 
Damien Le Moal
Western Digital Research
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.