[dm-devel] dm-mpath: Handling SCSI-3 PR RELEASE in multi-controller environment

Christoph Hellwig hch at lst.de
Mon Sep 26 16:03:17 UTC 2016


On Thu, Sep 22, 2016 at 04:14:50PM +0800, jiangyiwen wrote:
> I briefly reviewed the PR API. If I understand correctly, a bunch of PR
> dedicated operations (pr_ops) are defined in block_device_operations, which
> includes register, reserve, release, preempt and clear operations. But among
> these operations, only register() calls dm_call_pr(), which in turns iterates
> over the device for each path and does the registeration.

Register and unregister in fact, but they both multiple throught the
same method.

> My point is, we also need to do this in release operation, so that we can
> eliminate the possibility of trying to release the reservation on the wrong
> controller and get a fake success.

dm_grab_bdev_for_ioctl ensures that we have a working path.  At least
that's the theory and my testing confirms it.  If you know a case where
the release doesn't work using this path we'll need to fix.




More information about the dm-devel mailing list