All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Rockai <prockai@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] Another take on vg_read.
Date: Thu, 22 Jan 2009 18:48:14 +0100	[thread overview]
Message-ID: <87prif8c69.fsf@eriador.mornfall.net> (raw)
In-Reply-To: <1232645811.8897.6.camel@localhost.localdomain> (Dave Wysochanski's message of "Thu, 22 Jan 2009 12:36:50 -0500")

Dave Wysochanski <dwysocha@redhat.com> writes:
> Agk's earlier comments still unaddressed:
> 1. PATCH6 (old patch#4/11). vg_read_error().
> use a typedef for the return value of vg_read_error(), or explain what the
> uint32_t means 
> https://www.redhat.com/archives/lvm-devel/2009-January/msg00039.html
Yes, I have deferred this.

> 2. PATCH2. flag naming/definition.
> Use a common prefix so they get grouped together.  Line up the 0x0000 parts
> vertically making their "single bit" nature more obvious.
> https://www.redhat.com/archives/lvm-devel/2009-January/msg00036.html
The 0x00 are hopefully lined up now and these look addressed to me. Common
prefix: why? They are far more readable this way and I don't know what prefix
to add, either.

> 3. PATCH2. EXISTENCE_CHECK definition.
> Ambiguous meaning - which is it?  1. self-evident (delete).  2. reserved for
> future (say 'reserved').
> https://www.redhat.com/archives/lvm-devel/2009-January/msg00036.html
This is explained in a comment, and I believe justified as it is.

> 4. PATCH2. _vg_make_handle
> naming and possible 'failure' typedef
> https://www.redhat.com/archives/lvm-devel/2009-January/msg00037.html
It is used to make non-error handles as well, so I don't think it should be
renamed. See the new comment above the function explaining it.

> 5. PATCH2. _recover_vg()
> [note to check call paths later if more than one VG lock is held simultaneously]
> https://www.redhat.com/archives/lvm-devel/2009-January/msg00037.html
This can probably be addressed by not doing any recovery in case DISABLE_LOCK
is given to vg_read?

> 6. PATCH2. Flag definition.
> Some flags (ALLOW_INCONSISTENT) still need comment definitions.
> https://www.redhat.com/archives/lvm-devel/2009-January/msg00037.html
Indeed. ALLOW_INCONSISTENT is explained in _vg_lock_and_read comment. It
probably deserves moving to vg_read description or to the flag definition
itself. (Most other flags are described in vg_read description as well.)

> 7. PATCH2. read_failed member
> Let's add a brief comment explaining this one.
> read_failed ? Yes or No.  Rename it perhaps?
> I think it should be completely separate from 'status' and 'alloc'.
> https://www.redhat.com/archives/lvm-devel/2009-January/msg00037.html
The added comment currently says what 0 and non-0 means and is separate from
both status and alloc. Something else that needs changing there?

> 8. PATCH2 (old patch#3/11) _vg_check_status
> typedef for the return value?
> https://www.redhat.com/archives/lvm-devel/2009-January/msg00038.html
Yes, typedef, see point 1.

> Future cleanup:
> 1. FAILED_READ_ONLY
> Note only FAILED_READ_ONLY is used by any tool today - only vgreduce.
> Further, FAILED_READ_ONLY can only occur with LVM1 metadata as far as I
> can tell.
>
> 2. PATCH2. _vg_lock_and_read failure path with invalid name returns NULL.
> Note that callling vg_read_error() after hitting this path will return
> FAILED_ALLOCATION.  Do we need FAILED_INVALID_NAME or perhaps re-use
> FAILED_NOT_FOUND?
> https://www.redhat.com/archives/lvm-devel/2009-January/msg00040.html
Noted.

Yours,
   Petr.

-- 
Peter Rockai | me()mornfall!net | prockai()redhat!com
 http://blog.mornfall.net | http://web.mornfall.net

"In My Egotistical Opinion, most people's C programs should be
 indented six feet downward and covered with dirt."
     -- Blair P. Houghton on the subject of C program indentation



      reply	other threads:[~2009-01-22 17:48 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-22 10:09 [PATCH] Another take on vg_read Petr Rockai
2009-01-22 10:09 ` [PATCH 1/14] Move vg_read out of the way, renaming it to vg_read_internal Petr Rockai
2009-01-22 10:09   ` [PATCH 2/14] Provide _vg_lock_and_read, a new implementation of lock+vg_read_internal Petr Rockai
2009-01-22 10:09     ` [PATCH 3/14] Properly enforce cluster locking in _vg_lock_and_read Petr Rockai
2009-01-22 10:10       ` [PATCH 4/14] Replace implementation of vg_check_status with a call to _vg_check_status Petr Rockai
2009-01-22 10:10         ` [PATCH 5/14] Implement vg_read and vg_read_for_update Petr Rockai
2009-01-22 10:10           ` [PATCH 6/14] Add vg_read_error and vg_might_exist Petr Rockai
2009-01-22 10:10             ` [PATCH 7/14] Convert the straight instances of vg_lock_and_read to new vg_read(_for_update) Petr Rockai
2009-01-22 10:10               ` [PATCH 8/14] Convert vgreduce to use vg_read_for_update Petr Rockai
2009-01-22 10:10                 ` [PATCH 9/14] Convert vgrename to vg_read_for_update Petr Rockai
2009-01-22 10:10                   ` [PATCH 10/14] Convert vgsplit to use vg_read_for_update Petr Rockai
2009-01-22 10:10                     ` [PATCH 11/14] Rework the toollib interface (process_each_*) on top of new vg_read Petr Rockai
2009-01-22 10:10                       ` [PATCH 12/14] Port process_each_pv to " Petr Rockai
2009-01-22 10:10                         ` [PATCH 13/14] Remove now-unused vg_lock_and_read Petr Rockai
2009-01-22 10:10                           ` [PATCH 14/14] Un-export vg_read_internal Petr Rockai
2009-01-26 16:05                             ` Dave Wysochanski
2009-01-22 16:13                         ` [PATCH 12/14] Port process_each_pv to new vg_read Dave Wysochanski
2009-01-24 21:45                 ` [PATCH updated] Convert vgreduce to use vg_read_for_update Dave Wysochanski
2009-01-24 21:46                   ` [PATCH] " Dave Wysochanski
2009-01-25  0:21                     ` [PATCH update2] " Dave Wysochanski
2009-01-25  0:21                       ` [PATCH] " Dave Wysochanski
2009-01-22 18:17       ` [PATCH 3/14] Properly enforce cluster locking in _vg_lock_and_read Dave Wysochanski
2009-01-22 20:15         ` Petr Rockai
2009-02-06 18:21     ` [PATCH 2/14] Provide _vg_lock_and_read, a new implementation of lock+vg_read_internal Dave Wysochanski
2009-01-22 17:36 ` [PATCH] Another take on vg_read Dave Wysochanski
2009-01-22 17:48   ` Petr Rockai [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=87prif8c69.fsf@eriador.mornfall.net \
    --to=prockai@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.