linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wols Lists <antlists@youngman.org.uk>
To: Geliang Tang <geliang.tang@suse.com>, Coly Li <colyli@suse.de>
Cc: nvdimm@lists.linux.dev, linux-block@vger.kernel.org,
	linux-raid@vger.kernel.org, Hannes Reinecke <hare@suse.de>,
	Jens Axboe <axboe@kernel.dk>, NeilBrown <neilb@suse.de>,
	Vishal L Verma <vishal.l.verma@intel.com>
Subject: Re: [PATCH v3 3/6] badblocks: improvement badblocks_set() for multiple ranges handling
Date: Thu, 9 Dec 2021 18:37:26 +0000	[thread overview]
Message-ID: <8f24c6f7-1799-e318-1b6c-e54083229b8b@youngman.org.uk> (raw)
In-Reply-To: <20211209072859.GB26976@dhcp-10-157-36-190>

On 09/12/2021 07:28, Geliang Tang wrote:
> On Thu, Dec 02, 2021 at 08:52:41PM +0800, Coly Li wrote:
>> Recently I received a bug report that current badblocks code does not

> 
>> + *        +--------+----+
>> + *        |    S   | E  |
>> + *        +--------+----+
>> + * 2.2) The setting range size == already set range size
>> + * 2.2.1) If S and E are both acked or unacked range, the setting range S can
>> + *    be merged into existing bad range E. The result is,
>> + *        +-------------+
>> + *        |      S      |
>> + *        +-------------+
>> + * 2.2.2) If S is uncked setting and E is acked, the setting will be denied, and
> 
> uncked -> unacked
> 
>> + *    the result is,
>> + *        +-------------+
>> + *        |      E      |
>> + *        +-------------+
>> + * 2.2.3) If S is acked setting and E is unacked, range S can overwirte all of

overwirte -> overwrite

>> +      bad blocks range E. The result is,
>> + *        +-------------+
>> + *        |      S      |
>> + *        +-------------+
>> + * 2.3) The setting range size > already set range size
>> + *        +-------------------+
>> + *        |          S        |
>> + *        +-------------------+
>> + *        +-------------+
>> + *        |      E      |
>> + *        +-------------+
>> + *    For such situation, the setting range S can be treated as two parts, the
>> + *    first part (S1) is as same size as the already set range E, the second
>> + *    part (S2) is the rest of setting range.
>> + *        +-------------+-----+        +-------------+       +-----+
>> + *        |    S1       | S2  |        |     S1      |       | S2  |
>> + *        +-------------+-----+  ===>  +-------------+       +-----+
>> + *        +-------------+              +-------------+
>> + *        |      E      |              |      E      |
>> + *        +-------------+              +-------------+
>> + *    Now we only focus on how to handle the setting range S1 and already set
>> + *    range E, which are already explained in 1.2), for the rest S2 it will be
> 
Cheers,
Wol

  reply	other threads:[~2021-12-10  0:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-02 12:52 [PATCH v4 0/6] badblocks improvement for multiple bad block ranges Coly Li
2021-12-02 12:52 ` [PATCH v3 1/6] badblocks: add more helper structure and routines in badblocks.h Coly Li
2021-12-02 12:52 ` [PATCH v3 2/6] badblocks: add helper routines for badblock ranges handling Coly Li
2021-12-09  7:22   ` Geliang Tang
2021-12-10  6:57     ` Coly Li
2021-12-02 12:52 ` [PATCH v3 3/6] badblocks: improvement badblocks_set() for multiple " Coly Li
2021-12-09  7:28   ` Geliang Tang
2021-12-09 18:37     ` Wols Lists [this message]
2021-12-10  6:55       ` Coly Li
2021-12-02 12:52 ` [PATCH v3 4/6] badblocks: improve badblocks_clear() " Coly Li
2021-12-09  7:35   ` Geliang Tang
2021-12-02 12:52 ` [PATCH v3 5/6] badblocks: improve badblocks_check() " Coly Li
2021-12-02 12:52 ` [PATCH v3 6/6] badblocks: switch to the improved badblock handling code Coly Li
2021-12-02 12:52 ` [PATCH] test: user space code to test badblocks APIs Coly Li
  -- strict thread matches above, loose matches on Subject: below --
2021-09-13 16:36 [PATCH v3 0/7] badblocks improvement for multiple bad block ranges Coly Li
2021-09-13 16:36 ` [PATCH v3 3/6] badblocks: improvement badblocks_set() for multiple ranges handling Coly Li
2021-09-27  7:30   ` Geliang Tang
2021-09-27  8:16     ` Coly Li

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=8f24c6f7-1799-e318-1b6c-e54083229b8b@youngman.org.uk \
    --to=antlists@youngman.org.uk \
    --cc=axboe@kernel.dk \
    --cc=colyli@suse.de \
    --cc=geliang.tang@suse.com \
    --cc=hare@suse.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=nvdimm@lists.linux.dev \
    --cc=vishal.l.verma@intel.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).