rbd: only set disk to read-only once
rbd_open(), called every time the device is opened, calls set_device_ro(). There's no reason to set the device read-only or read-write every time it is opened. Just do this once during device setup, using set_disk_ro() instead because the struct block_device isn't available to us there. Signed-off-by: NJosh Durgin <josh.durgin@inktank.com> Reviewed-by: NAlex Elder <elder@linaro.org>
Showing
想要评论请 注册 或 登录