linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Edmund Nadolski <enadolski@suse.de>
To: dsterba@suse.cz, Liu Bo <bo.li.liu@oracle.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 0/7] retry write on error
Date: Tue, 28 Nov 2017 15:07:51 -0700	[thread overview]
Message-ID: <bd35756b-0089-0e20-a70c-b66dd3292208@suse.de> (raw)
In-Reply-To: <20171128192236.GE3553@twin.jikos.cz>



On 11/28/2017 12:22 PM, David Sterba wrote:
> On Tue, Nov 21, 2017 at 05:35:51PM -0700, Liu Bo wrote:
>> If the underlying protocal doesn't support retry and there are some
>> transient errors happening somewhere in our IO stack, we'd like to
>> give an extra chance for IO.  Or sometimes you see btrfs reporting
>> 'wrr 1 flush 0 read 0 blabla' but the disk drive is 100% good, this
>> retry may help a bit.
> 
> A limited number of retries may make sense, though I saw some long
> stalls after retries on bad disks. Tracking the retries would be a good
> addition to the dev stats, ie. a soft error but still worth reporting.

Seems preferable to avoid issuing retries when the underlying transport
layer(s) has already done so, but I am not sure there is a way to know
that at the fs level. Likewise for cases where a retry cannot succeed
(transport failures? media errors?).  It can get tricky to know how long
to delay between retries and when it is appropriate to stop retrying.

Ed

>> In btrfs, read retry is handled in bio_readpage_error() with the retry
>> unit being page size, for write retry however, we're going to do it in
>> a different way, as a write may consist of several writes onto
>> different stripes, retry write needs to be done right after the IO on
>> each stripe completes and arrives at endio.
>>
>> Patch 1-3 are the implementation of retry write on error for
>> non-raid56 profile.  Patch 4-6 are for raid56 profile.  Both raid56
>> and non-raid56 shares one retry function helper.
>>
>> Patch 3 does retry sector by sector, but since this patch set doesn't
>> included badblocks support, patch 7 changes it back to retry the whole
>> bio.  (I didn't fold patch 7 to patch 3 in the hope of just reverting
>> patch 7 once badblocks support is done, but I'm open to it.)
> 
> What does 'badblocks' refer to? I know about the badblocks utility that
> find and reportts bad blocks, possibly ext2 understands that and avoids
> allocating them. Btrfs does not have such support.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

  reply	other threads:[~2017-11-28 22:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-22  0:35 [PATCH 0/7] retry write on error Liu Bo
2017-11-22  0:35 ` [PATCH 1/7] Btrfs: keep a copy of bi_iter in btrfs_io_bio Liu Bo
2017-11-22  0:35 ` [PATCH 2/7] Btrfs: add helper __btrfs_end_bio Liu Bo
2017-11-22  0:35 ` [PATCH 3/7] Btrfs: retry write for non-raid56 Liu Bo
2017-11-22 14:41   ` Nikolay Borisov
2017-11-28 23:01     ` Liu Bo
2017-11-22  0:35 ` [PATCH 4/7] Btrfs: get rbio inside fail_bio_stripe Liu Bo
2017-11-22  0:35 ` [PATCH 5/7] Btrfs: add helper __raid_write_end_io Liu Bo
2017-11-22  0:35 ` [PATCH 6/7] Btrfs: retry write for raid56 Liu Bo
2017-11-22  0:35 ` [PATCH 7/7] Btrfs: retry the whole bio on write error Liu Bo
2017-11-28 19:22 ` [PATCH 0/7] retry write on error David Sterba
2017-11-28 22:07   ` Edmund Nadolski [this message]
2017-11-28 23:41     ` Peter Grandi
2017-11-29  4:09       ` Anand Jain
2017-11-29 16:47         ` David Sterba
2017-11-30 20:22           ` Liu Bo
2017-12-03 21:00             ` Peter Grandi
2017-12-04  9:14             ` Anand Jain
2017-12-04 20:49             ` Edmund Nadolski
2017-12-05 18:57             ` David Sterba
2017-11-29 18:09   ` Liu Bo

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=bd35756b-0089-0e20-a70c-b66dd3292208@suse.de \
    --to=enadolski@suse.de \
    --cc=bo.li.liu@oracle.com \
    --cc=dsterba@suse.cz \
    --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).