On Tue, Nov 19, 2019 at 9:50 AM Dongsheng Yang <dongsheng.yang@xxxxxxxxxxxx> wrote: > > > Hi Ilya, > > On 11/18/2019 09:38 PM, Ilya Dryomov wrote: > > Hello, > > > > This series makes read-only mappings compatible with read-only caps: > > we no longer establish a watch, > > Although this is true in userspace librbd, I think that's wired: when > there is someone is reading this image, it can be removed. And the > reader will get all zero for later reads. > > What about register a watcher but always ack for notifications? Then > we can prevent removing from image being reading. We can't register a watch because it is a write operation on the OSD and we want read-only mappings to be usable with read-only OSD caps: $ ceph auth add client.ro ... osd 'profile rbd-read-only' $ sudo rbd map --user ro -o ro ... Further, while returning zeros if an image or a snapshot is removed is bad, a watch isn't a good solution. It can be lost, and even when it's there it's still racy. See the description of patch 7. Thanks, Ilya