* [PATCH] fsck.f2fs: show elapsed time of full scan
@ 2019-05-22 19:41 Jaegeuk Kim
2019-05-23 13:41 ` Chao Yu
0 siblings, 1 reply; 4+ messages in thread
From: Jaegeuk Kim @ 2019-05-22 19:41 UTC (permalink / raw)
To: linux-f2fs-devel; +Cc: Jaegeuk Kim
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);
return 0;
out_err:
--
2.19.0.605.g01d371f741-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] fsck.f2fs: show elapsed time of full scan
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
0 siblings, 1 reply; 4+ messages in thread
From: Chao Yu @ 2019-05-23 13:41 UTC (permalink / raw)
To: Jaegeuk Kim, linux-f2fs-devel
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.
if (c.func == FSCK)
printf();
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Thanks,
> return 0;
>
> out_err:
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fsck.f2fs: show elapsed time of full scan
2019-05-23 13:41 ` Chao Yu
@ 2019-05-23 14:08 ` Jaegeuk Kim
2019-05-23 14:16 ` Chao Yu
0 siblings, 1 reply; 4+ messages in thread
From: Jaegeuk Kim @ 2019-05-23 14:08 UTC (permalink / raw)
To: Chao Yu; +Cc: linux-f2fs-devel
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.
>
> if (c.func == FSCK)
> printf();
>
> Reviewed-by: Chao Yu <yuchao0@huawei.com>
>
> Thanks,
>
> > return 0;
> >
> > out_err:
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fsck.f2fs: show elapsed time of full scan
2019-05-23 14:08 ` Jaegeuk Kim
@ 2019-05-23 14:16 ` Chao Yu
0 siblings, 0 replies; 4+ messages in thread
From: Chao Yu @ 2019-05-23 14:16 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: linux-f2fs-devel
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:
>>>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-05-23 14:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.