All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ondrej Palkovsky <ondrap@penguin.cz>
To: dm-devel@redhat.com
Subject: dm-raid1 - error handling?
Date: Tue, 04 Dec 2007 17:53:06 +0100	[thread overview]
Message-ID: <475585F2.2040509@penguin.cz> (raw)

I have been browsing through source code of dm-raid1.c (kernel 2.6.23.1) 
and this seems to me weird.
Function write_callback in dm-raid1.c - what is it supposed to do? 
First, the if (error) block seems
like just one big NOP, second it looks like any error slips undetected.  
Am I correct or is there some logic I am not aware of?

Ondrej

{
.. declarations etc...
    if (error) {
        /*
         * only error the io if all mirrors failed.
         * FIXME: bogus
         */
        uptodate = 0;
        for (i = 0; i < ms->nr_mirrors; i++)
            if (!test_bit(i, &error)) {
                uptodate = 1;
                break;
            }
    }
    bio_endio(bio, bio->bi_size, 0);
} - end of function

                 reply	other threads:[~2007-12-04 16:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=475585F2.2040509@penguin.cz \
    --to=ondrap@penguin.cz \
    --cc=dm-devel@redhat.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.