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 3/5] btrfs: noinline btrfs_should_cancel_balance
Date: Wed, 16 Dec 2020 11:18:45 -0500	[thread overview]
Message-ID: <1533925fbaa996ed35ceab4a515476e1f503b625.1608135381.git.josef@toxicpanda.com> (raw)
In-Reply-To: <cover.1608135381.git.josef@toxicpanda.com>

I was attempting to reproduce a problem that Zygo hit, but my error
injection wasn't firing for a few of the common calls to
btrfs_should_cancel_balance.  This is because the compiler decided to
inline it at these spots.  Keep this from happening by explicitly
noinline'ing the function so that error injection will always work.

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/relocation.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index 19b7db8b2117..f9500262106e 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -2615,7 +2615,7 @@ int setup_extent_mapping(struct inode *inode, u64 start, u64 end,
 /*
  * Allow error injection to test balance cancellation
  */
-int btrfs_should_cancel_balance(struct btrfs_fs_info *fs_info)
+noinline int btrfs_should_cancel_balance(struct btrfs_fs_info *fs_info)
 {
 	return atomic_read(&fs_info->balance_cancel_req) ||
 		fatal_signal_pending(current);
-- 
2.26.2


  parent 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 ` [PATCH 1/5] btrfs: allow error injection for btrfs_search_slot and btrfs_cow_block Josef Bacik
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 ` Josef Bacik [this message]
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=1533925fbaa996ed35ceab4a515476e1f503b625.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.