From: Zdenek Kabelac <zkabelac@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] Clear up the confusing "precommit(ed)" terminology
Date: Thu, 01 Sep 2011 16:23:32 +0200 [thread overview]
Message-ID: <4E5F9564.4060205@redhat.com> (raw)
In-Reply-To: <18801.4269028374$1314817116@news.gmane.org>
Dne 31.8.2011 20:57, Petr Rockai napsal(a):
> Hi,
>
> we have discussed the current use of "precommit" and "precommitted"
> terminology as related to LVM metadata with Alasdair, and arrived at the
> following conclusion:
>
> The *state* of the metadata, what was most of the time called
> "precommitted" (and sometimes "precommit") is changed to "tentative".
>
> The *act* of writing the "precommitted" (i.e. tentative) metadata, which
> has been called "precommit" is now more explicitly part of vg_write (the
> *action* of precommitting only existed as part of metadata_area_ops and
> was called vg_precommit). To reflect the two-phase nature of vg_write
> with multiple MDAs, I have renamed vg_write in metadata_area_ops to
> vg_write_phase1 and vg_precommit to vg_write_phase2. Other suggestions
> have been made, for now I picked phase1/phase2 because it is the easiest
> to track down and rename to any other combination of names.
>
> The current (proposed) terminology therefore is:
> - the metadata after vg_write, but before vg_commit is "tentative"
> - the metadata after vg_write *and* vg_commit is "committed"
>
> There is no user-visible state between not-yet-written and tentative
> (even though vg_write is internally a 2-phase operation, this is not
> exposed in the metadata layer API).
>
> I am attaching 2 diffs, the first is the changes I did manually, the
> second is these changes with
>
> find -name \*.\[hc\] | xargs sed -i.orig -e 's,precommitted,tentative,g;s,PRECOMMIT\(TED\)\?,TENTATIVE,g;s,pre-committed,tentative,g;'
>
> on top (you can use interdiff to see just the diff produced by sed).
>
> Yours,
> Petr
>
>
>
> tentative_manual.diff
>ntext *fidtc = (struct text_fid_context *) fid->private;
> @@ -575,7 +575,7 @@ static int _vg_write_raw(struct format_i
> int r = 0;
> uint64_t new_wrap = 0, old_wrap = 0, new_end;
> int found = 0;
> - int noprecommit = 0;
> + int notentative = 0;
>
> /* Ignore any mda on a PV outside the VG. vgsplit relies on this */
> dm_list_iterate_items(pvl, &vg->pvs) {
> @@ -595,7 +595,7 @@ static int _vg_write_raw(struct format_i
> goto_out;
>
> rlocn = _find_vg_rlocn(&mdac->area, mdah,
> - vg->old_name ? vg->old_name : vg->name, &noprecommit);
> + vg->old_name ? vg->old_name : vg->name, ¬entative);
> mdac->rlocn.offset = _next_rlocn_offset(rlocn, mdah);
I'm certainly not an English linguist expert here - but "notentative" looks
even more weird.
For my understanding precommit made more sense then tentative - I'm not
objecting the idea of cleaning it - but this term makes it even more
confusing. If we are going to use 2-phase commit - I'd use term
phase1/phase2 here.
Zdenek
next parent reply other threads:[~2011-09-01 14:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <18801.4269028374$1314817116@news.gmane.org>
2011-09-01 14:23 ` Zdenek Kabelac [this message]
2011-09-01 15:54 ` [PATCH] Clear up the confusing "precommit(ed)" terminology Petr Rockai
2011-08-31 18:57 Petr Rockai
2011-09-01 19:57 ` Alasdair G Kergon
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=4E5F9564.4060205@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.