From: Chao Yu <chao@kernel.org>
To: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH] fsck.f2fs: show elapsed time of full scan
Date: Thu, 23 May 2019 22:16:09 +0800 [thread overview]
Message-ID: <98c0e013-1609-a0f1-03e3-fc7d77863c8e@kernel.org> (raw)
In-Reply-To: <20190523140811.GB10954@jaegeuk-macbookpro.roam.corp.google.com>
On 2019-5-23 22:08, Jaegeuk Kim wrote:
> On 05/23, Chao Yu wrote:
>> On 2019-5-23 3:41, Jaegeuk Kim wrote:
>>> This patch introduces the elapsed time of fsck.
>>>
>>> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
>>> ---
>>> fsck/main.c | 4 +++-
>>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/fsck/main.c b/fsck/main.c
>>> index d844820..9aca024 100644
>>> --- a/fsck/main.c
>>> +++ b/fsck/main.c
>>> @@ -18,6 +18,7 @@
>>> #include "fsck.h"
>>> #include <libgen.h>
>>> #include <ctype.h>
>>> +#include <time.h>
>>> #include <getopt.h>
>>> #include "quotaio.h"
>>>
>>> @@ -745,6 +746,7 @@ int main(int argc, char **argv)
>>> {
>>> struct f2fs_sb_info *sbi;
>>> int ret = 0;
>>> + clock_t start = clock();
>>>
>>> f2fs_init_configuration();
>>>
>>> @@ -853,7 +855,7 @@ retry:
>>> if (ret < 0)
>>> return ret;
>>>
>>> - printf("\nDone.\n");
>>> + printf("\nDone: %lf secs\n", (clock() - start) / (double)CLOCKS_PER_SEC);
>>
>> Minor, as comment log says it's only for fsck.
>
> I think it doesn't matter for other use cases, even though main reason was for
> fsck.
Okay, it's not a big deal. :)
Thanks,
>
>>
>> if (c.func == FSCK)
>> printf();
>>
>> Reviewed-by: Chao Yu <yuchao0@huawei.com>
>>
>> Thanks,
>>
>>> return 0;
>>>
>>> out_err:
>>>
prev parent reply other threads:[~2019-05-23 14:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-22 19:41 [PATCH] fsck.f2fs: show elapsed time of full scan Jaegeuk Kim
2019-05-23 13:41 ` Chao Yu
2019-05-23 14:08 ` Jaegeuk Kim
2019-05-23 14:16 ` Chao Yu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=98c0e013-1609-a0f1-03e3-fc7d77863c8e@kernel.org \
--to=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).