All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH - v2] LVM: New flag, LV_REBUILD
Date: Fri, 18 Nov 2011 18:19:52 +0100	[thread overview]
Message-ID: <4EC693B8.3060109@redhat.com> (raw)
In-Reply-To: <4A1A2F14-071E-4BB2-9BE5-5D23F89CC85A@redhat.com>

Dne 18.11.2011 18:11, Jonathan Brassow napsal(a):
>
> On Nov 18, 2011, at 10:05 AM, Jonathan Brassow wrote:
>
>>
>> On Nov 16, 2011, at 2:06 PM, Zdenek Kabelac wrote:
>>
>>> Dne 14.11.2011 19:06, Jonathan Brassow napsal(a):
>>>> Changes from previous:
>>>> - New rebuild flag is now written to on-disk LVM metadata
>>>> - An additional metadata write/commit is necessary to clear the flag
>>>> after a proper resume
>>>> - flags.c file updated
>>>>
>>>> brassow
>>>>
>>>> Add new flag, LV_REBUILD.
>>>>
>>>> Until now, I had been using the LV_NOTSYNCED as a flag to indicate that RAID
>>>> sub-LVs needed to be rebuilt.  (The 'rebuild' parameter is then specified in
>>>> the DM CTR table.)  However, I don't want to use a flag that gets written to
>>>> the LVM metadata... and the LV_NOTSYNCED flag's original meaning does not
>>>> suite the purpose adequately.
>>>>
>>>> This patch proposes and uses a new flag, LV_REBUILD.
>>>
>>> Hmm so now - when it's written to disk - it looks like  LV_REBUILD and LV_NOTSYNCED is mostly the same meaning - except  one is used in raid
>>> and original in mirror ?
>>>
>>> So I think it's easier to keep just one flag ?
>>> (Well the bit field space is somewhat limited)
>>
>> Perhaps.  I've considered this and certainly it'd be easy for me to leave things the way they are.  However, LV_NOTSYNCED means that the LV was created (or extended) with '--nosync', and signifies that it has not and will not undergo a complete synchronization.  LV_REBUILD, on the other hand, means precisely the opposite - the LV is to undergo a complete synchronization now.  LV_NOTSYNCED signifies an attribute of the LV, while LV_REBUILD signifies an action that needs to be taken.
>>
>> The only reason the difference is not more obvious is because you can look at 'LV_NOTSYNCED' sideways and sort-of make it work.  "These sub-LVs are not in-sync right now, and must be made to be in-sync." - or some similar thinking could get you there.
>>
>> I'm good either way, but I'd prefer the new flag...
>
> Now that I think a little more on it, I'm becoming even more in favor of the separate flag.
>
> Consider the case we discussed earlier, where the machine dies after the vg_commit but before the resume.  This leaves the 'rebuild' DM table argument yet to be supplied to the kernel in order to clear the device's bitmap.  When the machine comes up and it is required to clean-up the flags after activation, it would complicate the process to force the code to know when the LV_NOTSYNCED flag means that the LV was not synced and to leave the flag, or whether it means the LV needs to be synced/rebuilt and the flag must be cleared.


If the rebuild is different state from not_synced - i.e.  raid will use both 
states - then you surely need new flag.

I've been just having impression that not_synced is something only from 
mirrors, and rebuild would be used only for raid.

Zdenek



      reply	other threads:[~2011-11-18 17:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-10 22:26 [PATCH] LVM: New flag, LV_REBUILD Jonathan Brassow
2011-11-11 16:23 ` Zdenek Kabelac
2011-11-12  0:12   ` Jonathan Brassow
2011-11-14 18:06 ` [PATCH - v2] " Jonathan Brassow
2011-11-16 20:06   ` Zdenek Kabelac
2011-11-18 16:05     ` Jonathan Brassow
2011-11-18 17:11       ` Jonathan Brassow
2011-11-18 17:19         ` Zdenek Kabelac [this message]

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=4EC693B8.3060109@redhat.com \
    --to=zkabelac@redhat.com \
    --cc=lvm-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.