Am 29.05.2018 um 17:27 hat Jeff Cody geschrieben: > On Fri, May 25, 2018 at 06:33:17PM +0200, Kevin Wolf wrote: > > This changes the x-blockdev-create QMP command so that it doesn't block > > the monitor and the main loop any more, but starts a background job that > > performs the image creation. > > > > This comes down to "user error", but now that the monitor and main loop are > not blocked (which is good), should we try at all to catch/prevent a > blockdev-add that is issued before a blockdev-create completion?
Hm, currently, the .bdrv_co_create implementations usually do this: blk = blk_new(BLK_PERM_WRITE | BLK_PERM_RESIZE, BLK_PERM_ALL); I'm not sure if BLK_PERM_ALL is the best options for the shared permissions, but anyway format drivers can't share BLK_PERM_WRITE on their part, so I think we already do prevent this by taking the BLK_PERM_WRITE permission. Kevin