linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heinz Mauelshagen <mauelshagen@redhat.com>
To: Mario 'BitKoenig' Holbe <Mario.Holbe@TU-Ilmenau.DE>
Cc: linux-raid@vger.kernel.org
Subject: Re: No syncing after crash. Is this a software raid bug?
Date: Sat, 4 Mar 2006 10:01:12 +0100	[thread overview]
Message-ID: <20060304090112.GC2976@redhat.com> (raw)
In-Reply-To: <duahsu$tgn$1@sea.gmane.org>

On Sat, Mar 04, 2006 at 12:01:50AM +0100, Mario 'BitKoenig' Holbe wrote:
> Heinz Mauelshagen <mauelshagen@redhat.com> wrote:
> > On Fri, Mar 03, 2006 at 03:30:29PM +0100, Mario 'BitKoenig' Holbe wrote:
> >> But when a dirty page is modified while it's being accessed, it stays
> >> dirty and gets cleaned (i.e. written to disk) later again, right?
> > A mirroring driver (eg. the MD raid1 personality), will access the dirty
> > page multiple times to store the data on multiple mirrors before the dirty
> > flag will be cleared during endio processing.
> 
> So the dirty flag *is* cleared even if the page was modified while the
> mirroring driver did access it?

Yes, *after* it accessed it multiple times in order to update the
mirrors in the set. The mirroring driver doesn't track such changes.
If it relies on static page content during updates of its mirrors, it
need to take a private copy of the page(s).

> 
> > o write gets through to first mirror
> > o page content gets changed
> > o second write gets through to other mirror
> ...
> > This is what I meant by well-behaved applications.
> > The DBMS will write to such (eventually) inconsistent blocks
> > *before* it'll read them back in hence removing the block-level inconsistency.
> >> And couldn't this happen even on swap without reboot inbetween when a
> >> page really needs to be read from disk?
> > It shouldn't, because page-ins will follow page-outs first.
> > Meanwhile the transient page table(s) will contain the disk address(es)
> > of the respective page(s).
> 
> But given the rough scenario above there *are* page-outs first.
> Wouldn't it be possible (in both cases: the DBMS as well as the swap
> scenario), that the now cleaned page is read in later from the first
> mirror and thus contains the old content which was written before it
> got changed, written to the other mirror and got cleared?

No, a write before another read will happen unless you
found an unknown bogus case ;)

Heinz

> 
> 
> regards
>    Mario
> -- 
> <jv> Oh well, config
> <jv> one actually wonders what force in the universe is holding it
> <jv> and makes it working
> <Beeth> chances and accidents :)
> 
> -
> 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

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Red Hat GmbH
Consulting Development Engineer                   Am Sonnenhang 11
Cluster and Storage Development                   56242 Marienrachdorf
                                                  Germany
Mauelshagen@RedHat.com                            +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

  reply	other threads:[~2006-03-04  9:01 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-01 12:44 No syncing after crash. Is this a software raid bug? Kasper Dupont
2006-03-01 13:58 ` Luca Berra
2006-03-01 16:24 ` Mike Hardy
2006-03-01 21:56 ` Kasper Dupont
2006-03-02 13:48   ` Mario 'BitKoenig' Holbe
2006-03-03 13:39     ` Heinz Mauelshagen
2006-03-03 14:30       ` Mario 'BitKoenig' Holbe
2006-03-03 22:26         ` Heinz Mauelshagen
2006-03-03 23:01           ` Mario 'BitKoenig' Holbe
2006-03-04  9:01             ` Heinz Mauelshagen [this message]
2006-03-04 10:10               ` Mario 'BitKoenig' Holbe
2006-03-03  7:30   ` Kasper Dupont
2006-03-03 12:03     ` Mario 'BitKoenig' Holbe
2006-03-03 12:38       ` Mario 'BitKoenig' Holbe
2006-03-03 14:48     ` Kasper Dupont
2006-03-03 15:10       ` Mario 'BitKoenig' Holbe
2006-03-04 13:16       ` Kasper Dupont
2006-03-04 13:38         ` Mario 'BitKoenig' Holbe
2006-03-04 19:50         ` Kasper Dupont
2006-03-07 10:47         ` Heinz Mauelshagen
2006-03-07 11:18           ` Kasper Dupont
2006-03-07 12:12             ` Heinz Mauelshagen
2006-03-10  7:43             ` Heinz Mauelshagen
2006-03-10  7:49               ` Kasper Dupont
2006-03-16  7:24                 ` Kasper Dupont
2006-03-16 14:04                   ` Heinz Mauelshagen

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=20060304090112.GC2976@redhat.com \
    --to=mauelshagen@redhat.com \
    --cc=Mario.Holbe@TU-Ilmenau.DE \
    --cc=linux-raid@vger.kernel.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 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).