From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chao Yu Subject: Re: [PATCH] fsck.f2fs: show elapsed time of full scan Date: Thu, 23 May 2019 22:16:09 +0800 Message-ID: <98c0e013-1609-a0f1-03e3-fc7d77863c8e@kernel.org> References: <20190522194141.91216-1-jaegeuk@kernel.org> <86b041c4-301b-40b3-d293-ca5365c87600@kernel.org> <20190523140811.GB10954@jaegeuk-macbookpro.roam.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1hToWB-0004Aa-7G for linux-f2fs-devel@lists.sourceforge.net; Thu, 23 May 2019 14:16:27 +0000 Received: from mail.kernel.org ([198.145.29.99]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) id 1hToW9-002o9u-7k for linux-f2fs-devel@lists.sourceforge.net; Thu, 23 May 2019 14:16:27 +0000 In-Reply-To: <20190523140811.GB10954@jaegeuk-macbookpro.roam.corp.google.com> Content-Language: en-US List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net To: Jaegeuk Kim Cc: linux-f2fs-devel@lists.sourceforge.net 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 >>> --- >>> 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 >>> #include >>> +#include >>> #include >>> #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 >> >> Thanks, >> >>> return 0; >>> >>> out_err: >>>