linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Thumshirn <jthumshirn@suse.de>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>, David Sterba <dsterba@suse.com>
Cc: Linux BTRFS Mailinglist <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 0/5] remove BUG_ON()s in btrfs_close_one_device()
Date: Tue, 12 Nov 2019 13:57:47 +0100	[thread overview]
Message-ID: <8b8ccd76-63f5-2265-0b90-dc6b9264f36b@suse.de> (raw)
In-Reply-To: <aa11c13a-1714-308e-9d79-ba8db3182439@gmx.com>

On 12/11/2019 13:40, Qu Wenruo wrote:
[...]
> Good patchset, but for error injection we have more formal way to do that.
> 
> ALLOW_ERROR_INJECTION() macro along with BPF to override function return
> value.
> 
> There is even a more generic script to do that:
> https://github.com/adam900710/btrfs-profiler/blob/master/inject.py
> 
> Such tool allow us to only inject error when certain call sites are met,
> so it can be pretty handful.

Yes I know, but my current test environment is not yet able to handle
this. So I resorted to just throw in some hand crafted error injection here.

If we find injecting errors in the alloc_device() code path is
worthwhile I'll add an ALLOW_ERROR_INJECTION() there.

Thanks,
	Johannes
-- 
Johannes Thumshirn                            SUSE Labs Filesystems
jthumshirn@suse.de                                +49 911 74053 689
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5
90409 Nürnberg
Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

  reply	other threads:[~2019-11-12 12:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-12 12:24 [PATCH 0/5] remove BUG_ON()s in btrfs_close_one_device() Johannes Thumshirn
2019-11-12 12:24 ` [PATCH 1/5] btrfs: decrement number of open devices after closing the device not before Johannes Thumshirn
2019-11-12 12:24 ` [PATCH 2/5] btrfs: handle device allocation failure in btrfs_close_one_device() Johannes Thumshirn
2019-11-12 12:24 ` [PATCH 3/5] btrfs: handle allocation failure in strdup Johannes Thumshirn
2019-11-12 12:24 ` [PATCH 4/5] btrfs: handle error return of close_fs_devices() Johannes Thumshirn
2019-11-12 12:24 ` [PATCH 5/5] btrfs: remove final BUG_ON() in close_fs_devices() Johannes Thumshirn
2019-11-12 12:41   ` Qu Wenruo
2019-11-12 12:55     ` David Sterba
2019-11-12 12:59       ` Johannes Thumshirn
2019-11-12 12:40 ` [PATCH 0/5] remove BUG_ON()s in btrfs_close_one_device() Qu Wenruo
2019-11-12 12:57   ` Johannes Thumshirn [this message]
2019-11-12 12:49 ` 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=8b8ccd76-63f5-2265-0b90-dc6b9264f36b@suse.de \
    --to=jthumshirn@suse.de \
    --cc=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).