I understand. I can do it. One quick question: is image id unique across all pools? I'm referencing image using 'image_<image id>' key and then keeping pool id in the omap value. Is it safe? On Tue, Apr 26, 2016 at 9:09 AM, Jason Dillaman <jdillama@xxxxxxxxxx> wrote: >> The problem that I see with this approach is: let's say we start >> adding an image to a cg and the cg is in adding image state. >> It either means that somebody is already adding an image to this cg or >> somebody died while adding this image. >> And we can't really understand it. > > The metadata link from CG -> image should be in the "adding" state, > not the entire CG. There shouldn't be anything preventing > concurrently adding two different images to a CG. > >> >> So, my suggestion is: normally the command fails if it finds the cg in >> an unexpected state. >> If the user adds flag --force then it picks up this unfinished >> operation and completes it and then adds the new image. >> How does that sound? > > My concern w/ adding a "--force" command for this is that it can be > abused. Personally, I'd rather see that the API is robust enough to > handle these partial states. If an "add" fails, I should be able to > repeat the "add" and have it work or run "remove" to have it clean up > any intermediate state. > > > -- > Jason -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html