[...] >> >> If you want to support [NO_]OVERWRITE, then prior to calling the common >> function we can play with flags, thus you end up with just: >> >> if (flags & VIR_STORAGE_POOL_BUILD_OVERWRITE) >> dir_create_flags |= VIR_DIR_CREATE_ALLOW_EXIST; >> >> return virStorageBackendBuildFileDirCommon(pool, dir_create_flags); >> >> >> The *_fs.c code would be >> >> unsigned int dir_create_flags = VIR_DIR_CREATE_ALLOW_EXIST; >> ... >> >> if (virStorageBackendBuildFileDirCommon(pool, dir_create_flags) < 0) >> goto error; >> ... >> >> and the common code would receive dir_create_flags >> >> The comments would then need to be updated a bit... If you have a >> suggestion or would prefer to just follow the *_fs.c model - I can >> adjust that too - let me know. >> > > follow the *_fs.c model seems more reasonable OK - the flags are really there only for the FS pool (they are not used for the netfs or dir). So for the VZ pool I'll only check that they aren't provided, IOW: virCheckFlags(0, -1); Just so you're aware, here's my plan of action. I've posted three patches which will make a couple of the *_fs.c pool API's common/local and *all* of the *_fs.c volume API's local. I've followed the naming of the exist vir*Backend*Local APIs (upload, download, and wipe): http://www.redhat.com/archives/libvir-list/2017-January/msg00928.html Once that series is ACK'd/pushed - I'll update these changes to follow on. In the end there will be 4 patches and they will be much smaller than what's here now. John -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list