You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating a write-only file on a block device with DmaFile::create without calling DmaFile::open to open a file with read permissions beforehand causes probe_iopoll_support to always return false. This causes the iopoll property to be cached as false and disables polling for all files on the BlockDevice while the program is running.
Each time DmaFile::open_at is called, probe_iopoll_support is called to determine the PollableStatus. If iopoll support has not been verified for the BlockDevice, it will check for support by performing a read on the file. If the file is being opened for writing, the OS will return Bad file descriptor (os error 9), triggering an error message and disabling polling for any file opened on the BlockDevice, even if it supports polling.
Minimal reproduction
use glommio::{LocalExecutor, io::DmaFile};fnmain(){
simple_logger::init().unwrap();let ex = LocalExecutor::default();
ex.run(async{let file = DmaFile::create("/tmp/file.txt").await.unwrap();
file.close().await.unwrap();});}
Output:
ERROR [glommio::reactor] got unexpected error when probing iopoll support for file "/tmp/file.txt" (fd: 7) hosted on (259, 3); the poll ring will be disabled for this device: Bad file descriptor (os error 9)
The text was updated successfully, but these errors were encountered:
Creating a write-only file on a block device with
DmaFile::create
without callingDmaFile::open
to open a file with read permissions beforehand causesprobe_iopoll_support
to always returnfalse
. This causes theiopoll
property to be cached as false and disables polling for all files on theBlockDevice
while the program is running.Each time
DmaFile::open_at
is called,probe_iopoll_support
is called to determine thePollableStatus
. Ifiopoll
support has not been verified for theBlockDevice
, it will check for support by performing a read on the file. If the file is being opened for writing, the OS will returnBad file descriptor (os error 9)
, triggering an error message and disabling polling for any file opened on theBlockDevice
, even if it supports polling.Minimal reproduction
Output:
The text was updated successfully, but these errors were encountered: