All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mykola Golub <to.my.trociny@gmail.com>
To: Victor Denisov <vdenisov@mirantis.com>
Cc: Jason Dillaman <dillaman@redhat.com>,
	Gregory Farnum <gfarnum@redhat.com>,
	Mykola Golub <mgolub@mirantis.com>,
	ceph-devel <ceph-devel@vger.kernel.org>,
	Josh Durgin <jdurgin@redhat.com>
Subject: Re: blueprint: consistency groups
Date: Tue, 3 May 2016 09:54:36 +0300	[thread overview]
Message-ID: <20160503065435.GA2159@gmail.com> (raw)
In-Reply-To: <CA+hcxJQGcDy96o0f9sEY8HwLXng9YzxsoKAhaaCuCDDhVbN76A@mail.gmail.com>

On Mon, May 02, 2016 at 05:26:04PM -0700, Victor Denisov wrote:
> I have a question regarding the implementation of list images in a
> consistency group.
> For referencing images I use their ids and pool ids, since image's
> name and pool's name are subject to change.
> In order to list the images in a consistency group I have a function:
> cg_list_images.
> This function only returns ids and pool ids.
> I presume normally users would like to see names instead of ids.
> Everything in rbd class is written the way that it accepts ioctx.
> Which is a handle for accessing pool.
> It means(in my opinion) that everything in rbd class should accept
> ioctx. As such, I can't open another ioctx when I'm already inside rbd
> class.
> It leaves me no choice, but to implement image's name resolution in
> tools/rbd/action/ConsGrp.cc.
> In this case only command line users can have images' names, but not
> other services that use librbd library.
> Is it fine?

You need to add RBD API functions. These functions operate only with
image names (image ID is unknown entity for RBD API). And use these
functions in tools/rbd/action/ConsGrp.cc. See for example the recently
added rbd_mirror_image_status_list(). Internally it uses
cls_client::mirror_image_status_list(), which returns image IDs; the
list is converted to image names, when returning to the user.

-- 
Mykola Golub

  reply	other threads:[~2016-05-03  6:54 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-24 15:50 blueprint: consistency groups Victor Denisov
2016-03-24 22:38 ` Gregory Farnum
2016-03-25  7:19   ` Mykola Golub
2016-03-29 17:54     ` Gregory Farnum
2016-04-22 23:49       ` Victor Denisov
     [not found]         ` <CA+aFP1CnKvVJrWDmKhpziu5otOV73HC5gnUsgZ8+oDW+708Rag@mail.gmail.com>
2016-04-25 21:11           ` Victor Denisov
2016-04-26 16:09             ` Jason Dillaman
2016-04-26 23:33               ` Victor Denisov
2016-04-27 17:50                 ` Jason Dillaman
2016-04-28 18:06                   ` Victor Denisov
2016-05-03  0:26                     ` Victor Denisov
2016-05-03  6:54                       ` Mykola Golub [this message]
2016-05-03 12:05                       ` Jason Dillaman
2016-05-03 21:48                         ` Victor Denisov
2016-05-04  0:29                           ` Jason Dillaman
2016-05-10 16:25                             ` Victor Denisov
2016-05-11 15:12                               ` Jason Dillaman
2016-05-11 18:44                                 ` Victor Denisov
2016-05-11 20:24                                   ` Jason Dillaman
2016-05-13  2:45                                     ` Victor Denisov
2016-05-16 15:48                                       ` Jason Dillaman
2016-05-23 15:32                                         ` Victor Denisov
2016-05-23 22:43                                           ` Victor Denisov
2016-05-24  2:39                                             ` Jason Dillaman
2016-05-24 22:42                                               ` Victor Denisov
2016-05-25  5:30                                                 ` Jason Dillaman
2016-05-25 21:34                                                   ` Victor Denisov
2016-05-26  0:53                                                     ` Jason Dillaman
2016-05-26  1:01                                                       ` Victor Denisov
2016-06-04  0:33                                                         ` Victor Denisov
2016-06-09 23:23                                                           ` Victor Denisov

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=20160503065435.GA2159@gmail.com \
    --to=to.my.trociny@gmail.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=dillaman@redhat.com \
    --cc=gfarnum@redhat.com \
    --cc=jdurgin@redhat.com \
    --cc=mgolub@mirantis.com \
    --cc=vdenisov@mirantis.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.