File tree Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -686,24 +686,19 @@ static struct io_u *fio_ioring_event(struct thread_data *td, int event)
686686 if (cqe -> res == io_u -> xfer_buflen ||
687687 (io_u -> ddir == DDIR_TRIM && !cqe -> res )) {
688688 io_u -> error = 0 ;
689+ if (io_u -> ddir == DDIR_READ && o -> md_per_io_size && !o -> pi_act )
690+ fio_ioring_validate_md (td , io_u );
689691 return io_u ;
690692 }
691693
692- if (cqe -> res != io_u -> xfer_buflen ) {
693- if (io_u -> ddir == DDIR_TRIM ) {
694- ld -> async_trim_fail = 1 ;
695- cqe -> res = 0 ;
696- }
697- if (cqe -> res > io_u -> xfer_buflen )
698- io_u -> error = - cqe -> res ;
699- else
700- io_u -> resid = io_u -> xfer_buflen - cqe -> res ;
701-
702- return io_u ;
694+ if (io_u -> ddir == DDIR_TRIM ) {
695+ ld -> async_trim_fail = 1 ;
696+ cqe -> res = 0 ;
703697 }
704-
705- if (o -> md_per_io_size )
706- fio_ioring_validate_md (td , io_u );
698+ if (cqe -> res > io_u -> xfer_buflen )
699+ io_u -> error = - cqe -> res ;
700+ else
701+ io_u -> resid = io_u -> xfer_buflen - cqe -> res ;
707702
708703 return io_u ;
709704}
You can’t perform that action at this time.
0 commit comments