linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: Yangtao Li <frank.li@vivo.com>, Jaegeuk Kim <jaegeuk@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: add fsnotify_sb_error() in f2fs_save_errors
Date: Wed, 17 May 2023 10:31:00 +0800	[thread overview]
Message-ID: <5f0218d5-f11d-92db-097a-1db76a142138@kernel.org> (raw)
In-Reply-To: <20230511091308.10509-1-frank.li@vivo.com>

On 2023/5/11 17:13, Yangtao Li wrote:
> When an EFSCORRUPTED error occurs in f2fs, report the error to
> userspace monitoring tools.
> 
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
>   fs/f2fs/super.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> index 51812f459581..42d5aa504afe 100644
> --- a/fs/f2fs/super.c
> +++ b/fs/f2fs/super.c
> @@ -28,6 +28,7 @@
>   #include <linux/part_stat.h>
>   #include <linux/zstd.h>
>   #include <linux/lz4.h>
> +#include <linux/fsnotify.h>
>   
>   #include "f2fs.h"
>   #include "node.h"
> @@ -4000,6 +4001,8 @@ void f2fs_save_errors(struct f2fs_sb_info *sbi, unsigned char flag)
>   		sbi->error_dirty = true;
>   	}
>   	spin_unlock_irqrestore(&sbi->error_lock, flags);
> +
> +	fsnotify_sb_error(sbi->sb, NULL, EFSCORRUPTED);

Can we call this function in irq context?

- f2fs_decompress_cluster
  - f2fs_save_errors

Thanks,

>   }
>   
>   static bool f2fs_update_errors(struct f2fs_sb_info *sbi)


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

      reply	other threads:[~2023-05-17  2:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-11  9:13 [f2fs-dev] [PATCH] f2fs: add fsnotify_sb_error() in f2fs_save_errors Yangtao Li via Linux-f2fs-devel
2023-05-17  2:31 ` 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=5f0218d5-f11d-92db-097a-1db76a142138@kernel.org \
    --to=chao@kernel.org \
    --cc=frank.li@vivo.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /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).