rbd: refuse to use an ec pool that doesn't support overwrites
When using an ec data pool that does not have the overwrites flag set, librbd ends up hitting an assert in the i/o path in librbd::exclusive_lock::PreReleaseRequest::handle_block_writes.
librbd can check for the overwrites pool flag when creating an image, since the flag cannot be unset.
#2 Updated by Josh Durgin 12 months ago
The flag will stick around for luminous. In the future if all ec pools supported overwrites, the flag would just always be set.
The api is not great right now - maybe we should have a rados_pool_supports_overwrites() librados method. Currently you'd need to use the mon commands (e.g. 'osd dump', look for the overwrites flag - which is getting renamed in https://github.com/ceph/ceph-ci/commit/f7643a24e0c77bbfb5930892f648664cc8aab636)
#3 Updated by Jason Dillaman 12 months ago
@Josh: do you also invision that users will need to set that flag in Luminous -- or should EC overwrites just work out-of-the-box? If it's the latter, this seems like a lot of work just to test for overwrite support. Perhaps librbd could just issue a 1-byte overwrite request on the pool the first time it is used?
#4 Updated by Josh Durgin 12 months ago
Yes, for luminous I think we'll have that flag still - mainly because it's a really bad idea to enable on filestore, due to lack of checksumming and performance compared to bluestore.
Checking for overwrites by trying one is more general, and cephfs (the other potential user) isn't using librados, so that sounds like a good way to go.