Linux Device Mapper development
 help / color / mirror / Atom feed
From: malahal@us.ibm.com
To: dm-devel@redhat.com, jbrassow@redhat.com
Cc: agk@redhat.com
Subject: Re: [RFC] [PATCH] lvm2: mirroredlog support
Date: Wed, 30 Sep 2009 17:13:54 -0700	[thread overview]
Message-ID: <20091001001354.GA15420@us.ibm.com> (raw)
In-Reply-To: <F5472B5D-59E5-4A38-948B-6055886E75A8@redhat.com>

Jonathan Brassow [jbrassow@redhat.com] wrote:
> Looking through the code before applying your patch, it seems that someone 
> has already thought about this issue - even if it hasn't been implemented.  
> For example, already in the top most function used to create mirrors, 
> 'lv_add_mirrors', we see a 'log_count' parameter.  That parameter can be 
> traced down through 'add_mirror_images/log', '_set_up_mirror_log', and even 
> the allocation functions.  In fact, the first comment in 'add_mirror_log' 
> is /* Unimplemented features */, followed by a check to see if 'log_count > 
> 1'.  Your patch seems to ignore 'log_count' and create new parameters (like 
> mirroredlog), which seem unnecessary to me...

Yes, I saw the log_count but not sure if I can use that for my purpose.
You can have multiple logs (reserved/standby mode implementations)
without the logs themselves mirrored.

> I don't understand why any 
> of the new parameters to the functions are necessary, can you explain?  [I 
> can see new parameters for '_create_mirror_log' though, as it doesn't seem 
> to maintain the 'log_count' parameter - but you didn't do work in that 
> function.]

_set_up_mirror_log() needs those extra parameters while calling
lv_extend() in the patch.

> You also seem to have violated the allocation policies by ignoring the line 
> of work that has been done up to '_set_up_mirror_log' by simply calling 
> 'add_mirror_images'.  This works, but it is oversimplified, I think.  You 
> can see this is incorrect by simply testing:
> prompt> lvcreate -m1 -L 500M -n lv vg /dev/sd[xy]1  # will fail because 
> there are only two devices
> prompt> lvcreate ... --mirroredlog /dev/sd[xy]1 # should fail, but succeeds 
> due to ignoring previous allocation work
> You may wish to push your enhancements into '_[create | init]_mirror_log'?

Thank you for spotting it. I will look into your suggestion.

> Additionally, the 'log_count' parameter is more general than 'mirroredlog' 
> and can support more log types.  Consider the following:
> --mirrorlog core => (log_count = 0)
> --mirrorlog disk => (log_count = 1)
> --mirrorlog redundant => (log_count = 2)
> --mirrorlog fully_redundant => (log_count = # of mirror legs)
> You are looking to add "redundant" (you can call it "mirrored" if you 
> like), but if we use 'log_count' in a general way, we get "fully_redundant" 
> (almost) for free.

The current patch actually creates fully_redundant log based what you
described.

If we are not going to use log_count for anything else other than
creating "mirrored" logs, I can use it. I remember Heinz implementing a
log device per mirror leg but the logs not not mirrored at all.

Alasdair, any comments?

Thanks, Malahal.

  parent reply	other threads:[~2009-10-01  0:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-23  3:03 [RFC] [PATCH] lvm2: mirroredlog support malahal
2009-09-23 20:29 ` Jonathan Brassow
2009-09-23 20:44   ` malahal
2009-09-24  5:22 ` Takahiro Yasui
2009-09-30 15:50 ` Jonathan Brassow
2009-09-30 16:35   ` Alasdair G Kergon
2009-09-30 19:48     ` Jonathan Brassow
2009-09-30 21:18       ` Alasdair G Kergon
2009-09-30 21:46         ` Alasdair G Kergon
2009-09-30 21:19       ` malahal
2009-10-01  0:13   ` malahal [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-12-30  0:10 malahal
2009-01-19 22:56 ` Takahiro Yasui
2009-01-20  1:54   ` malahal
2009-01-20 22:12     ` Takahiro Yasui
2009-01-20 21:29 ` Takahiro Yasui
2009-01-20 22:14   ` malahal
2009-01-23 19:14 ` Jonathan Brassow

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=20091001001354.GA15420@us.ibm.com \
    --to=malahal@us.ibm.com \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=jbrassow@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox