bdev: mark bdev as opened for write when claiming it
Otherwise we'd fail sanity checks when closing the claiming descriptor.
Current approach works because we never close the claiming descriptor.
Fixes: 4fc7e66614
("bdev: add vbdev claim/release semantics")
Change-Id: I1c1f0c11450e749419726df460334ab97b43b584
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/370179
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
parent
8b6f5d54db
commit
25499c4dba
@ -1586,6 +1586,7 @@ spdk_bdev_module_claim_bdev(struct spdk_bdev *bdev, struct spdk_bdev_desc *desc,
|
||||
}
|
||||
|
||||
if (desc && !desc->write) {
|
||||
bdev->bdev_opened_for_write = true;
|
||||
desc->write = true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user