fsck.f2fs: show elapsed time of full scan
PATCH 1/1 fsck.f2fs: show elapsed time of full scan
This patch introduces the elapsed time of fsck.
Signed-off-by Jaegeuk Kim <[email protected]>
--- fsck/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
fsck/main.c +3 -1
@@ -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:
Signature · 1 line
2.19.0.605.g01d371f741-goog
Quoted 28 lines · Jaegeuk Kim
This patch introduces the elapsed time of fsck.
Signed-off-by Jaegeuk Kim <[email protected]>--- fsck/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)fsck/main.c +2
-0@@ -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 ();
fsck/main.c retry: · line 858
Quoted 5 lines
fsck/main.c +1
-1@@ -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 <[email protected]>
Thanks,
Quoted 4 lines
fsck/main.c +0
-0return 0 ; out_err:
Quoted 28 lines · Chao Yu
Quoted 27 lines · Jaegeuk Kim
This patch introduces the elapsed time of fsck.
Signed-off-by Jaegeuk Kim <[email protected]>--- fsck/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)fsck/main.c +2
-0@@ -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 ();
Quoted 8 lines
fsck/main.c retry: · line 858
Quoted 6 lines
fsck/main.c +1
-1@@ -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.
Quoted 12 lines
if (c.func == FSCK)
printf();Reviewed-by Chao Yu <[email protected]>Thanks,
Quoted 4 lines
fsck/main.c +0
-0return 0 ; out_err:
Quoted 33 lines · Jaegeuk Kim
Quoted 32 lines · Chao Yu
Quoted 31 lines · Jaegeuk Kim
This patch introduces the elapsed time of fsck.
Signed-off-by Jaegeuk Kim <[email protected]>--- fsck/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)fsck/main.c +2
-0@@ -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;
Quoted 7 lines
Quoted 4 lines
fsck/main.c retry: · line 858
Quoted 2 lines
fsck/main.c +1
-1-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,
Quoted 13 lines
Quoted 13 lines
if (c.func == FSCK)
printf();Reviewed-by Chao Yu <[email protected]>Thanks,
Quoted 4 lines
fsck/main.c +0
-0return 0 ; out_err: