Re: [PATCHv4 5/9] block: add a helper function for dio alignment

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

 



On Thu, May 26, 2022 at 10:54:02AM +0900, Damien Le Moal wrote:
> Nit: The name of this helper really suggest a bool return, which would be a more
> flexible interface I think:
> 
> 	if (!blkdev_dio_aligned(bdev, pos, iter))
> 		return -EINVAL; <-- or whatever error code the caller wants.
> 
> And that will allow you to get rid of the ret variable in a least
> __blkdev_direct_IO_async.

I agree, a bool return looks more natural here.

Otherwise this looks good to me.



[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