On 10/12/21 9:36 AM, Christoph Hellwig wrote:
+/* + * Return how much of the chunk sectors is left to be used for an I/O at the + * given offset. + */ +static inline unsigned int chunk_size_left(sector_t offset, + unsigned int chunk_sectors) +{ + if (unlikely(!is_power_of_2(chunk_sectors))) + return chunk_sectors - sector_div(offset, chunk_sectors); + return chunk_sectors - (offset & (chunk_sectors - 1)); +}
No "blk_" prefix for the function name? I think most other functions declared or defined in this header file have such a prefix.
Thanks, Bart.