diff mbox series

btrfs: tree-checker: fix the error message for transid error

Message ID 20200825134251.31609-1-wqu@suse.com
State New, archived
Headers show
Series btrfs: tree-checker: fix the error message for transid error | expand

Commit Message

Qu Wenruo Aug. 25, 2020, 1:42 p.m. UTC
The error message for inode transid is the same for inode generation,
which makes us unable to detect the real problem.

Reported-by: Tyler Richmond <t.d.richmond@gmail.com>
Fixes: 496245cac57e ("btrfs: tree-checker: Verify inode item")
Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 fs/btrfs/tree-checker.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Marcos Paulo de Souza Aug. 25, 2020, 1:55 p.m. UTC | #1
On Tue, 2020-08-25 at 21:42 +0800, Qu Wenruo wrote:
> The error message for inode transid is the same for inode generation,
> which makes us unable to detect the real problem.

LGTM,

Reviewed-by: Marcos Paulo de Souza <mpdesouza@suse.com>

> 
> Reported-by: Tyler Richmond <t.d.richmond@gmail.com>
> Fixes: 496245cac57e ("btrfs: tree-checker: Verify inode item")
> Signed-off-by: Qu Wenruo <wqu@suse.com>
> ---
>  fs/btrfs/tree-checker.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
> index 517b44300a05..7b1fee630f97 100644
> --- a/fs/btrfs/tree-checker.c
> +++ b/fs/btrfs/tree-checker.c
> @@ -984,7 +984,7 @@ static int check_inode_item(struct extent_buffer
> *leaf,
>  	/* Note for ROOT_TREE_DIR_ITEM, mkfs could set its transid 0 */
>  	if (btrfs_inode_transid(leaf, iitem) > super_gen + 1) {
>  		inode_item_err(leaf, slot,
> -			"invalid inode generation: has %llu expect [0,
> %llu]",
> +			"invalid inode transid: has %llu expect [0,
> %llu]",
>  			       btrfs_inode_transid(leaf, iitem),
> super_gen + 1);
>  		return -EUCLEAN;
>  	}
David Sterba Aug. 26, 2020, 11:17 a.m. UTC | #2
On Tue, Aug 25, 2020 at 09:42:51PM +0800, Qu Wenruo wrote:
> The error message for inode transid is the same for inode generation,
> which makes us unable to detect the real problem.
> 
> Reported-by: Tyler Richmond <t.d.richmond@gmail.com>
> Fixes: 496245cac57e ("btrfs: tree-checker: Verify inode item")
> Signed-off-by: Qu Wenruo <wqu@suse.com>

Added to misc-next, thanks.
diff mbox series

Patch

diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
index 517b44300a05..7b1fee630f97 100644
--- a/fs/btrfs/tree-checker.c
+++ b/fs/btrfs/tree-checker.c
@@ -984,7 +984,7 @@  static int check_inode_item(struct extent_buffer *leaf,
 	/* Note for ROOT_TREE_DIR_ITEM, mkfs could set its transid 0 */
 	if (btrfs_inode_transid(leaf, iitem) > super_gen + 1) {
 		inode_item_err(leaf, slot,
-			"invalid inode generation: has %llu expect [0, %llu]",
+			"invalid inode transid: has %llu expect [0, %llu]",
 			       btrfs_inode_transid(leaf, iitem), super_gen + 1);
 		return -EUCLEAN;
 	}