We can't allow overlapped locked ranges - otherwise two different channels could be deadlocked. So add a pending_locked_ranges to the bdev. When we start a lock operation, check if the new range overlaps one that's already locked. If so, put it on the pending list. When an unlock operation completes, we will check if any pending ranges can now be locked. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I2e3113216a195887b954533495ff200df14fadc1 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478537 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> |
||
---|---|---|
.. | ||
.gitignore | ||
bdev_ut.c | ||
Makefile |