linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Lars Marowsky-Bree <lmb@suse.de>
Cc: linux-raid@vger.kernel.org
Subject: Re: [patch] md superblock update failures
Date: Wed, 16 Mar 2005 17:01:59 +0300	[thread overview]
Message-ID: <42383C57.7090702@tls.msk.ru> (raw)
In-Reply-To: <20050316132246.GM5305@marowsky-bree.de>

Lars Marowsky-Bree wrote:
[]
>  	err = 0;
> +	frdev = 0;
>  	ITERATE_RDEV(mddev,rdev,tmp) {
>  		char b[BDEVNAME_SIZE];
>  		dprintk(KERN_INFO "md: ");
> @@ -1296,13 +1298,21 @@ repeat:
>  
>  		dprintk("%s ", bdevname(rdev->bdev,b));
>  		if (!rdev->faulty) {
> -			err += write_disk_sb(rdev);
> +			int ret;
> +			ret = write_disk_sb(rdev);
> +			if (ret) {
> +				frdev = rdev;	/* Save failed device */
> +				err += ret;
> +			}

Why not
  +			int ret;
  +			ret = write_disk_sb(rdev);
  +			if (ret) {
  +				md_error(mddev, rdev);
  +				err += ret;
  +			}

instead (and remove frdev entirely)?

I mean, in theory, multiple disks may fail...
But wait.. will md_error() call this routine again?

/mjt

  reply	other threads:[~2005-03-16 14:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-16 13:05 [patch] md superblock update failures Lars Marowsky-Bree
2005-03-16 13:22 ` Lars Marowsky-Bree
2005-03-16 14:01   ` Michael Tokarev [this message]
2005-03-16 22:15 ` Neil Brown
2005-03-18 10:39   ` Lars Marowsky-Bree
2005-03-18 12:57     ` Peter T. Breuer

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=42383C57.7090702@tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=linux-raid@vger.kernel.org \
    --cc=lmb@suse.de \
    /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).