[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/3] block: add logging facility for long standing IO request
From: |
Denis V. Lunev |
Subject: |
Re: [PATCH 2/3] block: add logging facility for long standing IO requests |
Date: |
Mon, 24 Aug 2020 12:01:11 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 8/20/20 11:03 AM, David Edmondson wrote:
> On Monday, 2020-08-10 at 13:14:46 +03, Denis V. Lunev wrote:
>
>> + strftime(buf, sizeof(buf), "%m-%d %H:%M:%S",
> "%F %T" would include the year, which can be useful.
ok
>
>> + localtime_r(&start_time_host_s, &t));
>> +
>> + bs = blk_bs(blk_stats2blk(stats));
>> + qemu_log("long %s[%ld] IO request: %d.03%d since %s.%03d bs: %s(%s,
>> %s)\n",
>> + block_account_type(cookie->type), cookie->bytes,
>> + (int)(latency_ms / 1000), (int)(latency_ms % 1000), buf,
>> + (int)((cookie->start_time_ns / 1000000) % 1000),
> Is there a reason not to use %u rather than casting?
no, we could use unsigned.
Will resend shortly.