All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH 6/8] Add lvm_vg_get_tags(), lvm_vg_add_tag(), and lvm_vg_remove_tag().
Date: Thu, 18 Feb 2010 10:05:13 +0100	[thread overview]
Message-ID: <4B7D02C9.3000307@redhat.com> (raw)
In-Reply-To: <1266427744-30327-7-git-send-email-dwysocha@redhat.com>

On 17.2.2010 18:29, Dave Wysochanski wrote:
> Add lvm2app functions to manage VG tags.
> For lvm_vg_get_tags(), we return a list of tags, similar to other
> functions that return lists.  An empty list is returned if there
> are no VG tags.  NULL is returned if there is a problem obtaining
> the list of tags.
> 
> Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
> ---
>  liblvm/.exported_symbols |    3 ++
>  liblvm/lvm2app.h         |   51 ++++++++++++++++++++++++++++++++++++++++++++-
>  liblvm/lvm_vg.c          |   34 ++++++++++++++++++++++++++++++
>  3 files changed, 86 insertions(+), 2 deletions(-)
> 
> diff --git a/liblvm/.exported_symbols b/liblvm/.exported_symbols
> index c184a88..7431248 100644
> --- a/liblvm/.exported_symbols
> +++ b/liblvm/.exported_symbols
> @@ -18,6 +18,7 @@ lvm_vg_get_extent_size
>  lvm_vg_get_extent_count
>  lvm_vg_get_free_extent_count
>  lvm_vg_get_pv_count
> +lvm_vg_get_tags
>  lvm_lv_activate
>  lvm_lv_deactivate
>  lvm_lv_get_uuid
> @@ -33,6 +34,8 @@ lvm_vg_write
>  lvm_vg_open
>  lvm_vg_close
>  lvm_vg_remove
> +lvm_vg_add_tag
> +lvm_vg_remove_tag
>  lvm_scan
>  lvm_errno
>  lvm_errmsg
> diff --git a/liblvm/lvm2app.h b/liblvm/lvm2app.h
> index 39bfff8..41ce18c 100644
> --- a/liblvm/lvm2app.h
> +++ b/liblvm/lvm2app.h
> @@ -159,10 +159,10 @@ typedef struct lvm_pv_list {
>   * Lists of these structures are returned by lvm_list_vg_names and
>   * lvm_list_vg_uuids.
>   */
> -struct lvm_str_list {
> +typedef struct lvm_str_list {
>  	struct dm_list list;
>  	const char *str;
> -};
> +} lvm_str_list_t;
>


Looks quite similar to 'struct str_list' from lib/datastruct/lvm-types.h ?
Are we going to replace old one with new version ?




>  /*************************** generic lvm handling ***************************/
>  /**
> @@ -458,6 +458,26 @@ int lvm_vg_extend(vg_t vg, const char *device);
>  int lvm_vg_reduce(vg_t vg, const char *device);
>  
>  /**
> + * Add/remove a tag to/from a VG.
> + *
> + * These functions require calling lvm_vg_write to commit the change to disk.
> + * After successfully adding/removing a tag, use lvm_vg_write to commit the
> + * new VG to disk.  Upon failure, retry the operation or release the VG handle
> + * with lvm_vg_close.
> + *
> + * \param   vg
> + * VG handle obtained from lvm_vg_create or lvm_vg_open.
> + *
> + * \param   tag
> + * Tag to add/remove to/from VG.
> + *
> + * \return
> + * 0 (success) or -1 (failure).
> + */
> +int lvm_vg_add_tag(vg_t vg, const char *tag);
> +int lvm_vg_remove_tag(vg_t vg, const char *tag);

I assume doxygen will generate comment only for the lvm_vg_add_tag()
and lvm_vg_remove_tag() would be without any comment ?

Zdenek



  parent reply	other threads:[~2010-02-18  9:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-17 17:28 [PATCH 0/8] Add vg/lv tag addition/deletion to lvm2app, v2 Dave Wysochanski
2010-02-17 17:28 ` [PATCH 1/8] Refactor _vgchange_tag() to vg_change_tag() library function Dave Wysochanski
2010-02-17 17:28   ` [PATCH 2/8] Refactor vgcreate to call new vg_change_tag() function Dave Wysochanski
2010-02-17 17:28     ` [PATCH 3/8] Refactor lvchange_tag() to call lv_change_tag() library function Dave Wysochanski
2010-02-17 17:29       ` [PATCH 4/8] Add dm_pool_strdup to allocate memory and copy a tag in {lv|vg}_change_tag() Dave Wysochanski
2010-02-17 17:29         ` [PATCH 5/8] Add tag_list_copy() supporting function inside lvm2app Dave Wysochanski
2010-02-17 17:29           ` [PATCH 6/8] Add lvm_vg_get_tags(), lvm_vg_add_tag(), and lvm_vg_remove_tag() Dave Wysochanski
2010-02-17 17:29             ` [PATCH 7/8] Add lvm_lv_get_tags(), lvm_lv_add_tag(), and lvm_lv_remove_tag() Dave Wysochanski
2010-02-17 17:29               ` [PATCH 8/8] Update lvm2app interactive unit test for vg/lv tags Dave Wysochanski
2010-02-23 19:30                 ` [PATCH 0/4] Cleanup lvm2app.h doxygen documentation and add example Dave Wysochanski
2010-02-23 19:30                   ` [PATCH 1/4] Update doxygen comments for lvm2app.h Dave Wysochanski
2010-02-23 19:30                     ` [PATCH 2/4] Add Doxygen file for lvm2app to generate documentation from lvm2app.h Dave Wysochanski
2010-02-23 19:30                       ` [PATCH 3/4] Add an example to the lvm2app.h code, which is also part of the unit testing Dave Wysochanski
2010-02-23 19:30                         ` [PATCH 4/4] Add lvm_list_all.c to lvm2app nightly tests Dave Wysochanski
2010-02-18  9:05             ` Zdenek Kabelac [this message]
2010-02-23 15:07               ` [PATCH] RFC: move str_list inside lvm2app.h, include lvm2app.h inside lvm-types.h Dave Wysochanski
2010-02-23 18:21               ` [PATCH 6/8] Add lvm_vg_get_tags(), lvm_vg_add_tag(), and lvm_vg_remove_tag() Dave Wysochanski
2010-02-18  8:55         ` [PATCH 4/8] Add dm_pool_strdup to allocate memory and copy a tag in {lv|vg}_change_tag() Zdenek Kabelac
2010-02-18 12:17           ` Dave Wysochanski

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=4B7D02C9.3000307@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.