btrfs: add details to error messages at btrfs_delete_delayed_dir_index()
authorFilipe Manana <fdmanana@suse.com>
Fri, 30 May 2025 17:41:18 +0000 (18:41 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jul 2025 21:53:30 +0000 (23:53 +0200)
Update the error messages with:

1) Fix typo in the first one, deltiona -> deletion;

2) Remove redundant part of the first message, the part following the
   comma, and including all the useful information: root, inode, index
   and error value;

3) Update the second message to use more formal language (example 'error'
   instead of 'err'), , remove redundant part about "deletion tree of
   delayed node..." and print the relevant information in the same
   format and order as the first message, without the ugly opening
   parenthesis without a space separating from the previous word.
   This also makes the message similar in format to the one we have at
   btrfs_insert_delayed_dir_index().

Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/delayed-inode.c

index 6918340f4b38d2d567ff19fec450bf601bda3ec5..1e9bec6d24f7b67cededc607c2abc3aeacda4806 100644 (file)
@@ -1618,7 +1618,8 @@ int btrfs_delete_delayed_dir_index(struct btrfs_trans_handle *trans,
         */
        if (ret < 0) {
                btrfs_err(trans->fs_info,
-"metadata reservation failed for delayed dir item deltiona, should have been reserved");
+"metadata reservation failed for delayed dir item deletion, index: %llu, root: %llu, inode: %llu, error: %d",
+                         index, btrfs_root_id(node->root), node->inode_id, ret);
                btrfs_release_delayed_item(item);
                goto end;
        }
@@ -1627,9 +1628,8 @@ int btrfs_delete_delayed_dir_index(struct btrfs_trans_handle *trans,
        ret = __btrfs_add_delayed_item(node, item);
        if (unlikely(ret)) {
                btrfs_err(trans->fs_info,
-                         "err add delayed dir index item(index: %llu) into the deletion tree of the delayed node(root id: %llu, inode id: %llu, errno: %d)",
-                         index, btrfs_root_id(node->root),
-                         node->inode_id, ret);
+"failed to add delayed dir index item, root: %llu, inode: %llu, index: %llu, error: %d",
+                         index, btrfs_root_id(node->root), node->inode_id, ret);
                btrfs_delayed_item_release_metadata(dir->root, item);
                btrfs_release_delayed_item(item);
        }