28.03.2019 21:40, Kevin Wolf wrote: > Am 28.03.2019 um 08:21 hat Vladimir Sementsov-Ogievskiy geschrieben: >> bdrv_replace_child() calls bdrv_check_perm() with error_abort on >> loosening permissions. However file-locking operations may fail even >> in this case, for example on NFS. And this leads to Qemu crash. >> >> Let's ignore such errors, as we do already on permission update commit >> and abort. >> >> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> > > I think this would better be fixed in block.c code so that unlock never > fails for any block driver.
Hmm. We now only have one .bdrv_check_perm handler - raw_check_perm. And in this particular case, yes, the only thing we can do is ignoring error and do not fail on loosening permissions.. If we have more drivers with this callback, what should be the common behavior? Do you propose to ignore .bdrv_check_perm errors in common case? Isn't it better to require, that .bdrv_check_perm handler do not fail on loosening permissions, and abort if it fail in this case, like it actually works after this patch? > > But we're late for 4.0, so if fixing it in block.c proves difficult, > this might still be better than nothing and I could accept it as a > preliminary solution. > > Kevin > -- Best regards, Vladimir