[PATCH 2/2] Explicitly check td_trim(td) for the direction of next io_u

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This else case should explicitly check td_trim(td) since there is
a potential unused enum (e.g. DDIR_WAIT only used by iolog for now).

Signed-off-by: Tomohiro Kusumi <tkusumi@xxxxxxxxxx>
---
 io_u.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/io_u.c b/io_u.c
index f1a3916..69bec4b 100644
--- a/io_u.c
+++ b/io_u.c
@@ -758,8 +758,10 @@ static enum fio_ddir get_rw_ddir(struct thread_data *td)
 		ddir = DDIR_READ;
 	else if (td_write(td))
 		ddir = DDIR_WRITE;
-	else
+	else if (td_trim(td))
 		ddir = DDIR_TRIM;
+	else
+		ddir = DDIR_INVAL;
 
 	td->rwmix_ddir = rate_ddir(td, ddir);
 	return td->rwmix_ddir;
-- 
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux