All of lore.kernel.org
 help / color / mirror / Atom feed
From: malahal@us.ibm.com
To: dm-devel@redhat.com
Subject: Re: Desynchronizing dm-raid1
Date: Mon, 7 Apr 2008 08:41:06 -0700	[thread overview]
Message-ID: <20080407154106.GC3114@us.ibm.com> (raw)
In-Reply-To: <20080407142517.GA7327@redhat.com>

Heinz Mauelshagen [mauelshagen@redhat.com] wrote:
> > > RH_MAYBE_DIRTY sounds superfluous at first glance, because when all writes
> > > to a region drained, we can set RH_CLEAN_CANDIDATE, run the sync() and check
> > > if that state persists in order to trigger the dirty log update.

If I understand your above description: a region's state is set to
RH_DIRTY when an I/O is scheduled in the region and is set to
RH_CLEAN_CANDIDATE when all I/O is completed. In other words, a region's
state is RH_CLEAN_CANDIDATE when there is no pending I/O to that region.
Did I get it right so far?

Then we invoke sync(). Now, if the region's state is RH_CLEAN_CANDIDATE,
you set the region's state to RH_CLEAN. If the region's state is
anything other than RH_CLEAN_CANDIDATE, you don't do anything. Am I
correct?


> > I don't think the state RH_MAYBE_DIRTY is superfluous.  If the region
> > state is RH_CLEAN_CANDIDATE after the sync(), that means no 'write'
> > happened since we set RH_CLEAN_CANDIDATE. If there was any write, the
> > region state would be 'RH_DIRTY' or 'RH_MAYBE_DIRTY'.
> 
> Hrm, sound like a contradiction in your statement.
> Either it stays RH_CLEAN_CANDIDATE because of no writes *or*
> it's state-changing to RH_DIRTY, no ?

The state would be RH_CLEAN_CANDIDATE if there were ***NO*** writes as
part of sync(). The next statement only describes what would happen if
there were any writes as part of sync().

--Malahal.
PS: Any comments from the original submitter if he thinks the state
is really superfluous?

  reply	other threads:[~2008-04-07 15:41 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.64.0803131238520.23136@porkchop.devel.redhat.com>
     [not found] ` <Pine.LNX.4.64.0803171338130.7598@porkchop.devel.redhat.com>
     [not found]   ` <47DEC402.10309@redhat.com>
     [not found]     ` <Pine.LNX.4.64.0803171611430.31803@porkchop.devel.redhat.com>
     [not found]       ` <20080317215631.GG29322@agk.fab.redhat.com>
     [not found]         ` <Pine.LNX.4.64.0803181921380.10939@porkchop.devel.redhat.com>
     [not found]           ` <20080318233955.GA12007@agk.fab.redhat.com>
     [not found]             ` <Pine.LNX.4.64.0803181942140.20490@porkchop.devel.redhat.com>
     [not found]               ` <20080319000241.GB12007@agk.fab.redhat.com>
     [not found]                 ` <Pine.LNX.4.64.0803182015001.21077@porkchop.devel.redhat.com>
     [not found]                   ` <20080319011757.GD12007@agk.fab.redhat.com>
2008-04-02 20:23                     ` Desynchronizing dm-raid1 Mikulas Patocka
2008-04-02 22:13                       ` Mikulas Patocka
2008-04-03  1:40                       ` malahal
2008-04-03 14:49                         ` Martin K. Petersen
2008-04-07 17:05                         ` Martin K. Petersen
2008-04-07 17:22                           ` malahal
2008-04-07 17:44                             ` Martin K. Petersen
2008-05-05 21:45                           ` Mikulas Patocka
2008-05-06 10:29                             ` [dm-devel] " Herbert Xu
2008-05-06 10:29                               ` Herbert Xu
2008-05-06 22:50                               ` Mikulas Patocka
2008-05-13  3:28                                 ` Mikulas Patocka
2008-05-13  3:38                                   ` [dm-devel] " Herbert Xu
2008-05-13 20:35                                     ` Mikulas Patocka
2008-05-14  1:14                                       ` [dm-devel] " Herbert Xu
2008-05-22  2:18                                         ` Mikulas Patocka
2008-05-22  2:42                                           ` [dm-devel] " Herbert Xu
2008-05-22 12:32                                             ` Mikulas Patocka
2008-05-22 23:53                                               ` [dm-devel] " Herbert Xu
2008-05-23 14:59                                                 ` Mikulas Patocka
2008-05-24  0:01                                                   ` Herbert Xu
2008-05-24 14:01                                                     ` Mikulas Patocka
2008-04-07 23:31                         ` Mikulas Patocka
2008-04-03  9:19                       ` Heinz Mauelshagen
2008-04-03 14:21                         ` malahal
2008-04-07 14:25                           ` Heinz Mauelshagen
2008-04-07 15:41                             ` malahal [this message]
2008-04-07 23:27                               ` Mikulas Patocka
2008-04-08  0:04                                 ` malahal
2008-04-07 23:38                         ` Mikulas Patocka

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=20080407154106.GC3114@us.ibm.com \
    --to=malahal@us.ibm.com \
    --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.