From: David Sterba <dsterba@suse.cz>
To: Anand Jain <anand.jain@oracle.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2] btrfs: fix false EIO for missing device
Date: Mon, 16 Oct 2017 16:29:06 +0200 [thread overview]
Message-ID: <20171016142906.GP3521@twin.jikos.cz> (raw)
In-Reply-To: <20171014003402.7230-1-anand.jain@oracle.com>
On Sat, Oct 14, 2017 at 08:34:02AM +0800, Anand Jain wrote:
> When one of the device is missing, bbio_error() takes care
> of setting the error status. And if its only IO that is
> pending in that stripe, it fails to check the status of the
> other IO at %bbio_error before setting the error %bi_status
> for the %orig_bio. Fix this by checking if %bbio->error is
> has crossed the %bbio->max_errors. Thxs.
>
> Reproducer as below fdatasync error is seen intermittently.
>
> mount -o degraded /dev/sdc /btrfs
> dd status=none if=/dev/zero of=$(mktemp /btrfs/XXX) bs=4096 count=1 conv=fdatasync
>
> dd: fdatasync failed for ‘/btrfs/LSe’: Input/output error
>
> The reason for the intermittences of the problem is because..
> following condition has to be met, which depends on timely
> coordination.
> In btrfs_map_bio()
> . The RAID1 the missing device has to be at %dev_nr = 1
> In bbio_error()
> . Before bbio_error() is called the bio of the not-missing
> device at %dev_nr=0 must be completed so that the below
> condition is true
> if (atomic_dec_and_test(&bbio->stripes_pending)) {
>
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Added to queue, thanks.
prev parent reply other threads:[~2017-10-16 14:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-13 13:42 [PATCH] btrfs: fix false EIO for missing device Anand Jain
2017-10-13 18:01 ` Liu Bo
2017-10-14 0:33 ` Anand Jain
2017-10-14 0:34 ` [PATCH v2] " Anand Jain
2017-10-16 14:29 ` David Sterba [this message]
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=20171016142906.GP3521@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=anand.jain@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
/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).