Re: [PATCH v2 11/12] zbd: introduce zbd_offset_to_zone() helper

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

 



On Tue, Dec 14, 2021 at 10:24:12AM +0900, Damien Le Moal wrote:
> Introduce the helper function zbd_offset_to_zone() to get a zone
> structure using a file offset. In many functions, this replaces the
> two line code pattern:
> 
> 	zone_idx = zbd_offset_to_zone_idx(f, offset);
> 	z = zbd_get_zone(f, zone_idx);
> 
> with a single line of code:
> 
> 	z = zbd_offset_to_zone(f, offset);
> 
> Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxxxxxxxxxxxxx>
> ---

Reviewed-by: Niklas Cassel <niklas.cassel@xxxxxxx>



[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux