All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jes Sorensen <jes.sorensen@gmail.com>
To: NeilBrown <neilb@suse.com>
Cc: "Linux Raid" <linux-raid@vger.kernel.org>,
	"Bjørnar Ness" <bjornar.ness@gmail.com>
Subject: Re: [mdadm PATCH] Incremental: Use ->validate_geometry instead of ->avail_size
Date: Wed, 1 Nov 2017 17:27:06 -0400	[thread overview]
Message-ID: <7e500a7f-093d-b7d7-f02a-1e120e7bac89@gmail.com> (raw)
In-Reply-To: <87k1zdb5z6.fsf@notabene.neil.brown.name>

On 10/30/2017 12:43 AM, NeilBrown wrote:
> 
> Since mdadm 3.3 is has not been correct to call ->avail_size if
> metadata hasn't been read from the device.  ->validate_geometry
> should be used instead.
> 
> Unfortunately array_try_spare() didn't get the memo, and it can crash
> when adding a spare with no metdata.
> 
> So change it to use ->validate_geometry().
> 
> Only one place remains that uses ->avail_size(), and that is safe.
> 
> Also fix a comment with a typo.
> 
> Reported-and-tested-by: Bjørnar Ness <bjornar.ness@gmail.com>
> Fixes: 641da7459192 ("super1: separate to version of _avail_space1().")
> Signed-off-by: NeilBrown <neilb@suse.com>
> ---
>  Incremental.c | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)

Memo sent to array_try_spare()!

Thanks,
Jes



      reply	other threads:[~2017-11-01 21:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-30  4:43 [mdadm PATCH] Incremental: Use ->validate_geometry instead of ->avail_size NeilBrown
2017-11-01 21:27 ` Jes Sorensen [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=7e500a7f-093d-b7d7-f02a-1e120e7bac89@gmail.com \
    --to=jes.sorensen@gmail.com \
    --cc=bjornar.ness@gmail.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 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.