linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: Antoine Viallon <antoine@lesviallon.fr>,
	Antoine Viallon via Linux-f2fs-devel
	<linux-f2fs-devel@lists.sourceforge.net>
Subject: Re: [f2fs-dev] [PATCH] fsck.f2fs: Add progression feedback
Date: Thu, 6 Jan 2022 19:48:32 +0800	[thread overview]
Message-ID: <a6ee8d0b-1d67-0bcb-ba8c-06b0d691bb17@kernel.org> (raw)
In-Reply-To: <e8b0f25177675008c0eb234220ceb31f@lesviallon.fr>

On 2021/12/30 8:59, Antoine Viallon via Linux-f2fs-devel wrote:
> Some variable naming mistaskes were made in the last patch,
> here is an updated version.
> 
> ---
>   fsck/fsck.c | 9 +++++++++
>   fsck/fsck.h | 1 +
>   2 files changed, 10 insertions(+)
> 
> diff --git a/fsck/fsck.c b/fsck/fsck.c
> index ecd87af..921db0f 100644
> --- a/fsck/fsck.c
> +++ b/fsck/fsck.c
> @@ -546,6 +546,15 @@ int fsck_chk_node_blk(struct f2fs_sb_info *sbi, struct f2fs_inode *inode,
>          node_blk = (struct f2fs_node *)calloc(BLOCK_SZ, 1);
>          ASSERT(node_blk != NULL);
>   
> +       /* Progress report */
> +       sbi->fsck->chk.checked_node_cnt++;
> +
> +       if (sbi->fsck->chk.checked_node_cnt % 1000 == 0)
> +               printf("[FSCK] Check node %u / %u (%.2f%%)\n",
> +                          sbi->fsck->chk.checked_node_cnt,
> +                          sbi->total_valid_node_count,
> +                          100 * (float)(sbi->fsck->chk.checked_node_cnt) / sbi->total_valid_node_count);

How about showing this message in debug mode? may be under level one?

Thanks,

> +
>          if (sanity_check_nid(sbi, nid, node_blk, ftype, ntype, &ni))
>                  goto err;
>   
> diff --git a/fsck/fsck.h b/fsck/fsck.h
> index 11846e1..535d6d5 100644
> --- a/fsck/fsck.h
> +++ b/fsck/fsck.h
> @@ -93,6 +93,7 @@ struct f2fs_fsck {
>          struct chk_result {
>                  u64 valid_blk_cnt;
>                  u32 valid_nat_entry_cnt;
> +               u32 checked_node_cnt;
>                  u32 valid_node_cnt;
>                  u32 valid_inode_cnt;
>                  u32 multi_hard_link_files;


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  parent reply	other threads:[~2022-01-06 11:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-30  0:29 [f2fs-dev] [PATCH] fsck.f2fs: Add progression feedback Antoine Viallon via Linux-f2fs-devel
2021-12-30  0:59 ` Antoine Viallon via Linux-f2fs-devel
2022-01-06 11:48   ` Chao Yu via Linux-f2fs-devel
2022-01-06 11:48   ` Chao Yu [this message]
2022-01-06 15:33   ` Antoine Viallon via Linux-f2fs-devel
2022-01-06 15:42     ` Chao Yu
2022-01-06 19:48       ` Jaegeuk Kim
2022-01-06 11:40 ` Antoine Viallon via Linux-f2fs-devel
  -- strict thread matches above, loose matches on Subject: below --
2021-12-30  0:25 Antoine Viallon via Linux-f2fs-devel

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=a6ee8d0b-1d67-0bcb-ba8c-06b0d691bb17@kernel.org \
    --to=chao@kernel.org \
    --cc=antoine@lesviallon.fr \
    --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).