On 09/08/2013 01:14 AM, Da Chun Ng wrote:
I mapped an image to a system, and used blockdev to make it readonly. But it failed. [root@ceph0 mnt]# blockdev --setro /dev/rbd2 [root@ceph0 mnt]# blockdev --getro /dev/rbd2 0 It's on Centos6.4 with kernel 3.10.6 . Ceph 0.61.8 . Any idea?
For reasons I can't understand right now, calling set_device_ro(bdev, ro) in the driver seems to prevent future BLKROSET ioctls from having any effect, even though they should be calling exactly the same function. The rbd driver always calls set_device_ro() right now, which causes the problem. Presumably there's some cached information that isn't updated if the driver set the flags during device initialization. There's no reason you shouldn't be able to change it for non-snapshot mappings though. I added http://tracker.ceph.com/issues/6265 to track this. Josh _______________________________________________ ceph-users mailing list ceph-users@xxxxxxxxxxxxxx http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com