spdk_dd: Allow io_uring to use O_NONBLOCK

This works fine on recent Linux kernels.

Change-Id: If3bf7feb88666d5c3e4b2f3e5071d6be6937fdf8
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12515
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Ben Walker 2022-05-04 11:25:21 -07:00 committed by Jim Harris
parent cec27746ae
commit 84cec154e8

View File

@ -623,14 +623,6 @@ dd_open_file(struct dd_target *target, const char *fname, int flags, uint64_t sk
flags |= O_TRUNC;
}
#ifdef SPDK_CONFIG_URING
/* io_uring does not work correctly with O_NONBLOCK flag */
if (flags & O_NONBLOCK && g_opts.aio == false) {
flags &= ~O_NONBLOCK;
SPDK_WARNLOG("Skipping 'nonblock' flag due to existing issue with uring implementation and this flag\n");
}
#endif
target->type = DD_TARGET_TYPE_FILE;
*fd = open(fname, flags, 0600);
if (*fd < 0) {