on Linux (using 5.9) if my NVMe disk has a max_sectors_kb == 2048
but logical_block_size == 512
, does that still mean that if i submit a write of 2048KB that either...
- the entire operation will fail if the drive's kernel write queue is saturated (
nr_requests == 256
)
or
- the entire 2048KB write will be written and never less than 2048KB?
I'm using io_uring and O_DIRECT
.
io_uring
has a queue of its own and you can set itsentries
inio_uring_setup(2)
to a number larger than 256. Further the submission and completion queues are separate from the queues of in-flight requests so you would have to saturateentries
ANDnr_requests
.However you need to clarify your question. Are you actually asking "is O_DIRECT atomic even in the face of power failure?" (i.e. is all of a given I/O is written and if not does the area being written remain exactly as all old data)?
In the io-uring mailing list thread [PATCH v3 RESEND] iomap: set REQ_NOWAIT according to IOCB_NOWAIT in Direct IO there is a warning that an initial filesystem I/Os can be split apart and be sent down separately (and worse separately fail) if certain other options are set.
It's probably best to ask more directly over on the io_uring mailing list - http://vger.kernel.org/vger-lists.html#io-uring .