All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krishna Kanth Reddy <krish.reddy@samsung.com>
To: axboe@kernel.dk
Cc: fio@vger.kernel.org, Ankit Kumar <ankit.kumar@samsung.com>,
	Krishna Kanth Reddy <krish.reddy@samsung.com>
Subject: [PATCH 1/9] Adding the necessary ddir changes to introduce copy operation.
Date: Tue,  1 Dec 2020 17:10:26 +0530	[thread overview]
Message-ID: <20201201114034.8307-2-krish.reddy@samsung.com> (raw)
In-Reply-To: <20201201114034.8307-1-krish.reddy@samsung.com>

From: Ankit Kumar <ankit.kumar@samsung.com>

Signed-off-by: Krishna Kanth Reddy <krish.reddy@samsung.com>
---
 io_ddir.h | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/io_ddir.h b/io_ddir.h
index a42da97a..22e95f70 100644
--- a/io_ddir.h
+++ b/io_ddir.h
@@ -5,22 +5,23 @@ enum fio_ddir {
 	DDIR_READ = 0,
 	DDIR_WRITE = 1,
 	DDIR_TRIM = 2,
-	DDIR_SYNC = 3,
+	DDIR_COPY = 3,
+	DDIR_SYNC = 4,
 	DDIR_DATASYNC,
 	DDIR_SYNC_FILE_RANGE,
 	DDIR_WAIT,
 	DDIR_LAST,
 	DDIR_INVAL = -1,
 
-	DDIR_RWDIR_CNT = 3,
-	DDIR_RWDIR_SYNC_CNT = 4,
+	DDIR_RWDIR_CNT = 4,
+	DDIR_RWDIR_SYNC_CNT = 5,
 };
 
 #define for_each_rw_ddir(ddir)	for (enum fio_ddir ddir = 0; ddir < DDIR_RWDIR_CNT; ddir++)
 
 static inline const char *io_ddir_name(enum fio_ddir ddir)
 {
-	static const char *name[] = { "read", "write", "trim", "sync",
+	static const char *name[] = { "read", "write", "trim", "copy", "sync"
 					"datasync", "sync_file_range",
 					"wait", };
 
@@ -35,17 +36,20 @@ enum td_ddir {
 	TD_DDIR_WRITE		= 1 << 1,
 	TD_DDIR_RAND		= 1 << 2,
 	TD_DDIR_TRIM		= 1 << 3,
+	TD_DDIR_COPY		= 1 << 4,
 	TD_DDIR_RW		= TD_DDIR_READ | TD_DDIR_WRITE,
 	TD_DDIR_RANDREAD	= TD_DDIR_READ | TD_DDIR_RAND,
 	TD_DDIR_RANDWRITE	= TD_DDIR_WRITE | TD_DDIR_RAND,
 	TD_DDIR_RANDRW		= TD_DDIR_RW | TD_DDIR_RAND,
 	TD_DDIR_RANDTRIM	= TD_DDIR_TRIM | TD_DDIR_RAND,
 	TD_DDIR_TRIMWRITE	= TD_DDIR_TRIM | TD_DDIR_WRITE,
+	TD_DDIR_RANDCOPY	= TD_DDIR_COPY | TD_DDIR_RAND,
 };
 
 #define td_read(td)		((td)->o.td_ddir & TD_DDIR_READ)
 #define td_write(td)		((td)->o.td_ddir & TD_DDIR_WRITE)
 #define td_trim(td)		((td)->o.td_ddir & TD_DDIR_TRIM)
+#define td_copy(td)		((td)->o.td_ddir & TD_DDIR_COPY)
 #define td_rw(td)		(((td)->o.td_ddir & TD_DDIR_RW) == TD_DDIR_RW)
 #define td_random(td)		((td)->o.td_ddir & TD_DDIR_RAND)
 #define file_randommap(td, f)	(!(td)->o.norandommap && fio_file_axmap((f)))
@@ -60,19 +64,23 @@ static inline int ddir_sync(enum fio_ddir ddir)
 
 static inline int ddir_rw(enum fio_ddir ddir)
 {
-	return ddir == DDIR_READ || ddir == DDIR_WRITE || ddir == DDIR_TRIM;
+	return ddir == DDIR_READ || ddir == DDIR_WRITE || ddir == DDIR_TRIM ||
+	       ddir == DDIR_COPY;
 }
 
 static inline const char *ddir_str(enum td_ddir ddir)
 {
 	static const char *__str[] = { NULL, "read", "write", "rw", "rand",
 				"randread", "randwrite", "randrw",
-				"trim", NULL, "trimwrite", NULL, "randtrim" };
+				"trim", NULL, "trimwrite", NULL, "randtrim",
+				 NULL,  NULL, NULL, "copy",  NULL,  NULL,
+				 NULL, "randcopy" };
 
 	return __str[ddir];
 }
 
 #define ddir_rw_sum(arr)	\
-	((arr)[DDIR_READ] + (arr)[DDIR_WRITE] + (arr)[DDIR_TRIM])
+	((arr)[DDIR_READ] + (arr)[DDIR_WRITE] + (arr)[DDIR_TRIM] \
+	 + (arr)[DDIR_COPY])
 
 #endif
-- 
2.17.1



  parent reply	other threads:[~2020-12-01 11:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20201201114048epcas5p3e12de26128ce442bbe8406082eaccde9@epcas5p3.samsung.com>
2020-12-01 11:40 ` [PATCH 0/9] v1 Patchset : Simple Copy Command support Krishna Kanth Reddy
     [not found]   ` <CGME20201201114051epcas5p4b9c67cd0ad4b55fc9334dfde59ae349c@epcas5p4.samsung.com>
2020-12-01 11:40     ` Krishna Kanth Reddy [this message]
     [not found]   ` <CGME20201201114054epcas5p2cf4bff491f02c4a29a386ae44d5e42c7@epcas5p2.samsung.com>
2020-12-01 11:40     ` [PATCH 2/9] Introducing new offsets for the copy operation Krishna Kanth Reddy
     [not found]   ` <CGME20201201114057epcas5p1aa9d8e1a56197e55251191a0a5985e3d@epcas5p1.samsung.com>
2020-12-01 11:40     ` [PATCH 3/9] Added support for printing of stats and estimate time for " Krishna Kanth Reddy
     [not found]   ` <CGME20201201114100epcas5p2f02995779f5172f711cc6ad3d362d50a@epcas5p2.samsung.com>
2020-12-01 11:40     ` [PATCH 4/9] Adding a new " Krishna Kanth Reddy
     [not found]   ` <CGME20201201114103epcas5p1bbf3d8ca05252935c14fed68f44dab2d@epcas5p1.samsung.com>
2020-12-01 11:40     ` [PATCH 5/9] Added the changes for copy operation support in FIO Krishna Kanth Reddy
     [not found]   ` <CGME20201201114105epcas5p4b99d6a66a543152a377461875aedf342@epcas5p4.samsung.com>
2020-12-01 11:40     ` [PATCH 6/9] New ioctl based synchronous IO engine. Only supports copy command Krishna Kanth Reddy
     [not found]   ` <CGME20201201114107epcas5p4694adc6b50a123a06a06411393395636@epcas5p4.samsung.com>
2020-12-01 11:40     ` [PATCH 7/9] Example configuration for simple " Krishna Kanth Reddy
     [not found]   ` <CGME20201201114110epcas5p34032161c14f467576734346712d0c3db@epcas5p3.samsung.com>
2020-12-01 11:40     ` [PATCH 8/9] Support copy operation for zoned block devices Krishna Kanth Reddy
2020-12-01 12:11       ` Damien Le Moal
2020-12-10 14:14         ` Krishna Kanth Reddy
2020-12-11  0:37           ` Damien Le Moal
     [not found]   ` <CGME20201201114113epcas5p328eabe564e0bda24c29e285bba8d8fd2@epcas5p3.samsung.com>
2020-12-01 11:40     ` [PATCH 9/9] Add a new test case to test the copy operation Krishna Kanth Reddy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201201114034.8307-2-krish.reddy@samsung.com \
    --to=krish.reddy@samsung.com \
    --cc=ankit.kumar@samsung.com \
    --cc=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.