bdev/uring: open bdev file with O_RDWR flag
Without this flag, write requests will lead to I/O errors. Signed-off-by: Yao Liu <yotta.liu@ucloud.cn> Change-Id: I39a453683f7b2cbcd49fb8e0b532bf09f9180a8c Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473372 Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
d352c44ad0
commit
adf19fe6a3
@ -103,7 +103,7 @@ bdev_uring_open(struct bdev_uring *bdev)
|
||||
{
|
||||
int fd;
|
||||
|
||||
fd = open(bdev->filename, O_NOATIME | O_DIRECT);
|
||||
fd = open(bdev->filename, O_RDWR | O_DIRECT | O_NOATIME);
|
||||
if (fd < 0) {
|
||||
SPDK_ERRLOG("open() failed (file:%s), errno %d: %s\n",
|
||||
bdev->filename, errno, spdk_strerror(errno));
|
||||
|
Loading…
Reference in New Issue
Block a user