linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Brooks <john@fastquake.com>
To: NeilBrown <neilb@suse.com>, linux-raid@vger.kernel.org
Subject: Re: Inconsistent use of sectors vs 1k-blocks in sysfs and other places
Date: Tue, 20 Dec 2016 22:14:30 +0000	[thread overview]
Message-ID: <20161220221430.GA19146@oldkitsune.fastquake.com> (raw)
In-Reply-To: <87fulkvpgf.fsf@notabene.neil.brown.name>

On Mon, Dec 19, 2016 at 09:32:00AM +1100, NeilBrown wrote:
> The code is right by definition.  As you say, mdadm uses this interface
> so we cannot change it.

Yep, I expected as much and fully agree.

> >
> > Somewhat related, suspend_{lo|hi}, resync_{min|max} attributes specify ranges
> > in sectors, but the documentation does not specify if they are ranges on the
> > array size or device size. And RAID10 may even handle resync_max differently
> > from the rest; I didn't look deeply into that but see commit c805cdecea.
>
> suspend_{lo|hi} are are array addresses
> resync_{min|max} are array addresses for RAID1 and RAID10, and they are
> device-addresses-offset-from-data_offset for RAID1 and RAID456.

Good to know. One question, is it possible for the offset or size to be
different across disks in the same array? The documentation says that the size
is "normally" the same as component_size, implying that perhaps it could be
different.

> It is bad that the documentation is incorrect and incomplete.  If you we
> to post a patch which fixed some of it, I'm sure that would be
> thankfully accepted.

I will see what I can do.

> In theory you could have a RAID1 with an odd number of sectors used in
> each component, but I doubt that happens in practice.  So you can get
> the component size in sectors by reading component_size and multiplying
> by two.

Is that within a realm of possibility worth mentioning in the docs?

  reply	other threads:[~2016-12-20 22:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-17  5:14 Inconsistent use of sectors vs 1k-blocks in sysfs and other places John Brooks
2016-12-18 22:32 ` NeilBrown
2016-12-20 22:14   ` John Brooks [this message]
2016-12-21  0:06     ` NeilBrown

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=20161220221430.GA19146@oldkitsune.fastquake.com \
    --to=john@fastquake.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@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 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).