All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: Nagilum <nagilum@nagilum.org>
Cc: linux-raid <linux-raid@vger.kernel.org>
Subject: Re: Problem re-shaping RAID6
Date: Thu, 17 Jun 2010 15:47:08 +1000	[thread overview]
Message-ID: <20100617154708.227cd303@notabene.brown> (raw)
In-Reply-To: <20100614124723.84152dz5al8096f4@cakebox.homeunix.net>

On Mon, 14 Jun 2010 12:47:23 +0200
Nagilum <nagilum@nagilum.org> wrote:

> 
> ----- Message from neilb@suse.de ---------
>      Date: Mon, 14 Jun 2010 09:15:18 +1000
>      From: Neil Brown <neilb@suse.de>
>   Subject: Re: Problem re-shaping RAID6
>        To: Jérôme Poulin <jeromepoulin@gmail.com>
>        Cc: linux-raid <linux-raid@vger.kernel.org>
> 
> 
> > Thanks.
> > I fixed this bug a slightly different way
> >
> > -               blocks = ochunk/512 * nchunk/512 * odata * ndata / a;
> > +               blocks = (ochunk/512) * (nchunk/512) * odata * ndata / a;
> >
> >
> > See
> > http://neil.brown.name/git?p=mdadm;a=commitdiff;h=200871adf9e15d5ad985f28c349fd89c386ef48a
> 
> Those static numbers always make my nose wrinkle.
> Don't we have the blocksize somewhere already? I'm also concerned what  
> happens when true 4k sectors are used..
> 

A sector will always be 512 bytes to Linux, even when we have drives that can
only do IO in multiples of 8 sectors.  Changing that would cause way to many
headaches.

Yes,  I could possibly use a define for '512'.  Some times that is
appropriate, but I thing 512 is so clearly "bytes_per_sector" it would just
add an unnecessary level of indirection.
It is a question of taste really - no right answers.

Thanks,
NeilBrown

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" 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:[~2010-06-17  5:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-13 19:15 Problem re-shaping RAID6 Jérôme Poulin
2010-06-13 23:15 ` Neil Brown
2010-06-14 10:47   ` Nagilum
2010-06-17  5:47     ` Neil Brown [this message]
2010-06-17  8:20       ` Michael Evans
2010-06-18 10:53       ` Nagilum
     [not found]   ` <4C1BBE6E.5090802@tmr.com>
2010-06-29  1:11     ` Neil Brown

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=20100617154708.227cd303@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=nagilum@nagilum.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.