Closed michael-g closed 3 weeks ago
All too predictably I've found my bug shortly after posting: the flags
argument to open
should have been O_CREAT|O_TRUNC|O_RDWR
; setting 0644
in the mode
affects the file-permissions, not the file-descriptor.
Closing.
Regards
Mike
I have been trying to get to grips with
liburing
, in this particular case for opening/creating a file and writing its header in the same batch by usingio_uring_register_files_sparse
,io_uring_prep_openat_direct
andio_uring_prep_write
withIOSQE_IO_LINK
andIOSQE_FIXED_FILE
.However, while the open/create-operation works and the file is created as expected, the linked write always fails (for me, I'm sure I'm doing something wrong). The error is
EBADF
"Bad file descriptor".I'm using
liburing
versions 2.5 and 2.6, compiled from source. I'm running on Fedora 40 on kernel6.8.11-300.fc40.x86_64
.My compilation line (wrestled from CMake's grasp) is
... where
$HOME/alt
is the target for Liburing's./configure --prefix $HOME/alt
.