All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
To: linux-btrfs@vger.kernel.org, kernel-team@fb.com
Cc: Qu Wenruo <wqu@suse.com>,
	Johannes Thumshirn <johannes.thumshirn@wdc.com>
Subject: [PATCH 1/5] btrfs: allow error injection for btrfs_search_slot and btrfs_cow_block
Date: Wed, 16 Dec 2020 11:18:43 -0500	[thread overview]
Message-ID: <adca1f156b411abb1f094fe5bca34513fcd1f376.1608135381.git.josef@toxicpanda.com> (raw)
In-Reply-To: <cover.1608135381.git.josef@toxicpanda.com>

The following patches are going to address error handling in relocation,
in order to test those patches I need to be able to inject errors in
btrfs_search_slot and btrfs_cow_block, as we call both of these pretty
often in different cases during relocation.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 fs/btrfs/ctree.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index cc89b63d65a4..56e132d825a2 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -1494,6 +1494,7 @@ noinline int btrfs_cow_block(struct btrfs_trans_handle *trans,
 
 	return ret;
 }
+ALLOW_ERROR_INJECTION(btrfs_cow_block, ERRNO);
 
 /*
  * helper function for defrag to decide if two blocks pointed to by a
@@ -2821,6 +2822,7 @@ int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root *root,
 		btrfs_release_path(p);
 	return ret;
 }
+ALLOW_ERROR_INJECTION(btrfs_search_slot, ERRNO);
 
 /*
  * Like btrfs_search_slot, this looks for a key in the given tree. It uses the
-- 
2.26.2


  reply	other threads:[~2020-12-16 16:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-16 16:18 [PATCH 0/5] Fixes and tweaks around error handling Josef Bacik
2020-12-16 16:18 ` Josef Bacik [this message]
2020-12-16 16:18 ` [PATCH 2/5] btrfs: print the actual offset in btrfs_root_name Josef Bacik
2020-12-18 15:22   ` David Sterba
2020-12-16 16:18 ` [PATCH 3/5] btrfs: noinline btrfs_should_cancel_balance Josef Bacik
2020-12-16 16:18 ` [PATCH 4/5] btrfs: pass down the tree block level through ref-verify Josef Bacik
2020-12-16 16:18 ` [PATCH 5/5] btrfs: make sure owner is set in ref-verify Josef Bacik
2020-12-17 12:56 ` [PATCH 0/5] Fixes and tweaks around error handling Nikolay Borisov
2020-12-18 15:38 ` David Sterba

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=adca1f156b411abb1f094fe5bca34513fcd1f376.1608135381.git.josef@toxicpanda.com \
    --to=josef@toxicpanda.com \
    --cc=johannes.thumshirn@wdc.com \
    --cc=kernel-team@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@suse.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.