On Fri, Dec 10, 2021 at 11:15:41AM +0900, Damien Le Moal wrote: > Introduce the helper function zbd_get_zone_from_offset() to get a zone > structure using a file offset. This replaces the common code pattern: > > zone_idx = zbd_zone_idx_from_offset(f, _offset); > z = zbd_get_zone(f, zone_idx); > > with a single function call in many functions. Since you took real code that you are removing, perhaps add an example of the real code (with arguments) that you are adding. > > Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxxxxxxxxxxxxx> > --- Nice cleanup! I guess this depends on if you liked my renaming suggestion in patch 9/11 or not. If you did, then perhaps this function could be renamed in a similar way to something like: zbd_offset_to_zone() However, if you didn't like my renaming suggestion in patch 9/11, then this name is fine, as it will be consistent with the previous patch. Kind regards, Niklas