On Tue, Mar 31, 2026 at 11:28:02PM +0200, Andrey Albershteyn wrote:
> Reported verification errors to fsnotify through recently added fserror
> interface.
> 
> Signed-off-by: Andrey Albershteyn <[email protected]>
> Reviewed-by: "Darrick J. Wong" <[email protected]>
> Reviewed-by: Christoph Hellwig <[email protected]>
> ---
>  fs/verity/verify.c | 4 ++++
>  1 file changed, 4 insertions(+)

Acked-by: Eric Biggers <[email protected]>

>               if (memchr_inv(dblock->data, 0, params->block_size)) {
> +                     fserror_report_data_lost(inode, data_pos,
> +                                              params->block_size, GFP_NOFS);
>                       fsverity_err(inode,
>                                    "FILE CORRUPTED!  Data past EOF is not 
> zeroed");
>                       return false;
> @@ -312,6 +315,7 @@ static bool verify_data_block(struct fsverity_info *vi,
>               data_pos, level - 1, params->hash_alg->name, hsize, want_hash,
>               params->hash_alg->name, hsize,
>               level == 0 ? dblock->real_hash : real_hash);
> +     fserror_report_data_lost(inode, data_pos, params->block_size, GFP_NOFS);

The first case does the fserror call first and the log message second,
and the second case does them in the opposite order.  I don't think it
matters what the order is, but they should be consistent.

- Eric


_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to