Re: [PATCH 2/6] block: add blk_time_get_ns() and blk_time_get() helpers

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

 



On 1/24/24 2:28 AM, Christoph Hellwig wrote:
> On Tue, Jan 23, 2024 at 10:30:34AM -0700, Jens Axboe wrote:
>> Convert any user of ktime_get_ns() to use blk_time_get_ns(), and
>> ktime_get() to blk_time_get(), so we have a unified API for querying the
>> current time in nanoseconds or as ktime.
>>
>> No functional changes intended, this patch just wraps ktime_get_ns()
>> and ktime_get() with a block helper.
> 
> Given that the helper only is (and only should be) used in the
> block layer code, any reason not to keep it private in block/ ?

I did originally put it in there, but you then run into dependency
issues with needing the struct definitions too, eg for struct blk_plug.
Hence not sure it makes sense, even if logically it'd fit better there.

-- 
Jens Axboe





[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