blob: 6272b79b568242239ae93cd028e919029b83c7b7 [file] [log] [blame]
Jens Axboe2866c822006-10-09 15:57:48 +02001/*
Jens Axboeda751ca2007-03-14 10:59:33 +01002 * sg engine
3 *
4 * IO engine that uses the Linux SG v3 interface to talk to SCSI devices
Jens Axboe2866c822006-10-09 15:57:48 +02005 *
6 */
7#include <stdio.h>
8#include <stdlib.h>
9#include <unistd.h>
10#include <errno.h>
11#include <assert.h>
12#include <sys/poll.h>
Jens Axboe5f350952006-11-07 15:20:59 +010013
14#include "../fio.h"
Jens Axboe2866c822006-10-09 15:57:48 +020015
Jens Axboe34cfcda2006-11-03 14:00:45 +010016#ifdef FIO_HAVE_SGIO
17
Jens Axboe2866c822006-10-09 15:57:48 +020018struct sgio_cmd {
19 unsigned char cdb[10];
20 int nr;
21};
22
23struct sgio_data {
24 struct sgio_cmd *cmds;
25 struct io_u **events;
Jens Axboedc0deca2007-02-08 20:59:31 +010026 struct pollfd *pfds;
27 int *fd_flags;
28 void *sgbuf;
Jens Axboe2866c822006-10-09 15:57:48 +020029 unsigned int bs;
Jens Axboeb5af8292007-03-08 12:43:13 +010030 int type_checked;
Jens Axboe2866c822006-10-09 15:57:48 +020031};
32
33static void sgio_hdr_init(struct sgio_data *sd, struct sg_io_hdr *hdr,
34 struct io_u *io_u, int fs)
35{
36 struct sgio_cmd *sc = &sd->cmds[io_u->index];
37
38 memset(hdr, 0, sizeof(*hdr));
39 memset(sc->cdb, 0, sizeof(sc->cdb));
40
41 hdr->interface_id = 'S';
42 hdr->cmdp = sc->cdb;
43 hdr->cmd_len = sizeof(sc->cdb);
44 hdr->pack_id = io_u->index;
45 hdr->usr_ptr = io_u;
46
47 if (fs) {
Jens Axboecec6b552007-02-06 20:15:38 +010048 hdr->dxferp = io_u->xfer_buf;
49 hdr->dxfer_len = io_u->xfer_buflen;
Jens Axboe2866c822006-10-09 15:57:48 +020050 }
51}
52
Jens Axboeadee86c2007-02-08 13:04:36 +010053static int pollin_events(struct pollfd *pfds, int fds)
54{
55 int i;
56
57 for (i = 0; i < fds; i++)
58 if (pfds[i].revents & POLLIN)
59 return 1;
60
61 return 0;
62}
Jens Axboe2866c822006-10-09 15:57:48 +020063
Jens Axboee7d2e612007-12-11 10:49:39 +010064static int fio_sgio_getevents(struct thread_data *td, unsigned int min,
Jens Axboe0cbbc392014-09-30 16:04:12 -060065 unsigned int max,
66 const struct timespec fio_unused *t)
Jens Axboe2866c822006-10-09 15:57:48 +020067{
68 struct sgio_data *sd = td->io_ops->data;
Jens Axboeaf52b342007-03-13 10:07:47 +010069 int left = max, ret, r = 0;
Jens Axboedc0deca2007-02-08 20:59:31 +010070 void *buf = sd->sgbuf;
Jens Axboeaf52b342007-03-13 10:07:47 +010071 unsigned int i, events;
Jens Axboe946ff862007-04-02 11:04:47 +020072 struct fio_file *f;
Jens Axboe2866c822006-10-09 15:57:48 +020073
74 /*
Jens Axboeadee86c2007-02-08 13:04:36 +010075 * Fill in the file descriptors
Jens Axboe2866c822006-10-09 15:57:48 +020076 */
Jens Axboeadee86c2007-02-08 13:04:36 +010077 for_each_file(td, f, i) {
78 /*
79 * don't block for min events == 0
80 */
Jens Axboe4a851612014-04-14 10:04:21 -060081 if (!min)
Jens Axboe3a358452014-04-15 09:07:44 -060082 sd->fd_flags[i] = fio_set_fd_nonblocking(f->fd, "sg");
83 else
84 sd->fd_flags[i] = -1;
Jens Axboe4a851612014-04-14 10:04:21 -060085
Jens Axboedc0deca2007-02-08 20:59:31 +010086 sd->pfds[i].fd = f->fd;
87 sd->pfds[i].events = POLLIN;
Jens Axboe2866c822006-10-09 15:57:48 +020088 }
89
90 while (left) {
Jens Axboeadee86c2007-02-08 13:04:36 +010091 void *p;
92
Jens Axboe2866c822006-10-09 15:57:48 +020093 do {
94 if (!min)
95 break;
Jens Axboeadee86c2007-02-08 13:04:36 +010096
Jens Axboe2dc1bbe2007-03-15 15:01:33 +010097 ret = poll(sd->pfds, td->o.nr_files, -1);
Jens Axboeadee86c2007-02-08 13:04:36 +010098 if (ret < 0) {
Jens Axboeadee86c2007-02-08 13:04:36 +010099 if (!r)
Jens Axboe22819ec2007-02-18 07:47:14 +0100100 r = -errno;
Jens Axboee1161c32007-02-22 19:36:48 +0100101 td_verror(td, errno, "poll");
Jens Axboeadee86c2007-02-08 13:04:36 +0100102 break;
103 } else if (!ret)
104 continue;
105
Jens Axboe2dc1bbe2007-03-15 15:01:33 +0100106 if (pollin_events(sd->pfds, td->o.nr_files))
Jens Axboe2866c822006-10-09 15:57:48 +0200107 break;
108 } while (1);
109
Jens Axboeadee86c2007-02-08 13:04:36 +0100110 if (r < 0)
Jens Axboe2866c822006-10-09 15:57:48 +0200111 break;
112
Jens Axboeadee86c2007-02-08 13:04:36 +0100113re_read:
114 p = buf;
115 events = 0;
116 for_each_file(td, f, i) {
117 ret = read(f->fd, p, left * sizeof(struct sg_io_hdr));
118 if (ret < 0) {
119 if (errno == EAGAIN)
120 continue;
Jens Axboe22819ec2007-02-18 07:47:14 +0100121 r = -errno;
Jens Axboee1161c32007-02-22 19:36:48 +0100122 td_verror(td, errno, "read");
Jens Axboeadee86c2007-02-08 13:04:36 +0100123 break;
124 } else if (ret) {
125 p += ret;
126 events += ret / sizeof(struct sg_io_hdr);
127 }
128 }
129
130 if (r < 0)
131 break;
132 if (!events) {
133 usleep(1000);
134 goto re_read;
135 }
136
Jens Axboe2866c822006-10-09 15:57:48 +0200137 left -= events;
138 r += events;
139
140 for (i = 0; i < events; i++) {
141 struct sg_io_hdr *hdr = (struct sg_io_hdr *) buf + i;
142
143 sd->events[i] = hdr->usr_ptr;
144 }
145 }
146
Jens Axboeadee86c2007-02-08 13:04:36 +0100147 if (!min) {
Jens Axboeaffe05a2014-04-15 08:30:06 -0600148 for_each_file(td, f, i) {
Jens Axboe3a358452014-04-15 09:07:44 -0600149 if (sd->fd_flags[i] == -1)
150 continue;
151
Jens Axboeaffe05a2014-04-15 08:30:06 -0600152 if (fcntl(f->fd, F_SETFL, sd->fd_flags[i]) < 0)
153 log_err("fio: sg failed to restore fcntl flags: %s\n", strerror(errno));
154 }
Jens Axboeadee86c2007-02-08 13:04:36 +0100155 }
Jens Axboe2866c822006-10-09 15:57:48 +0200156
Jens Axboe2866c822006-10-09 15:57:48 +0200157 return r;
158}
159
Jens Axboe7a16dd02006-10-18 17:21:58 +0200160static int fio_sgio_ioctl_doio(struct thread_data *td,
161 struct fio_file *f, struct io_u *io_u)
Jens Axboe2866c822006-10-09 15:57:48 +0200162{
163 struct sgio_data *sd = td->io_ops->data;
164 struct sg_io_hdr *hdr = &io_u->hdr;
Jens Axboe36167d82007-02-18 05:41:31 +0100165 int ret;
Jens Axboe2866c822006-10-09 15:57:48 +0200166
167 sd->events[0] = io_u;
168
Jens Axboe36167d82007-02-18 05:41:31 +0100169 ret = ioctl(f->fd, SG_IO, hdr);
170 if (ret < 0)
Jens Axboea05bd422007-04-02 10:42:33 +0200171 return ret;
Jens Axboe36167d82007-02-18 05:41:31 +0100172
173 return FIO_Q_COMPLETED;
Jens Axboe2866c822006-10-09 15:57:48 +0200174}
175
Jens Axboe2b13e712011-01-19 14:04:16 -0700176static int fio_sgio_rw_doio(struct fio_file *f, struct io_u *io_u, int do_sync)
Jens Axboe2866c822006-10-09 15:57:48 +0200177{
178 struct sg_io_hdr *hdr = &io_u->hdr;
179 int ret;
180
Jens Axboe53cdc682006-10-18 11:50:58 +0200181 ret = write(f->fd, hdr, sizeof(*hdr));
Jens Axboe2866c822006-10-09 15:57:48 +0200182 if (ret < 0)
Jens Axboea05bd422007-04-02 10:42:33 +0200183 return ret;
Jens Axboe2866c822006-10-09 15:57:48 +0200184
Jens Axboe2b13e712011-01-19 14:04:16 -0700185 if (do_sync) {
Jens Axboe53cdc682006-10-18 11:50:58 +0200186 ret = read(f->fd, hdr, sizeof(*hdr));
Jens Axboe2866c822006-10-09 15:57:48 +0200187 if (ret < 0)
Jens Axboea05bd422007-04-02 10:42:33 +0200188 return ret;
Jens Axboe36167d82007-02-18 05:41:31 +0100189 return FIO_Q_COMPLETED;
Jens Axboe2866c822006-10-09 15:57:48 +0200190 }
191
Jens Axboe36167d82007-02-18 05:41:31 +0100192 return FIO_Q_QUEUED;
Jens Axboe2866c822006-10-09 15:57:48 +0200193}
194
Jens Axboe2b13e712011-01-19 14:04:16 -0700195static int fio_sgio_doio(struct thread_data *td, struct io_u *io_u, int do_sync)
Jens Axboe2866c822006-10-09 15:57:48 +0200196{
Jens Axboe53cdc682006-10-18 11:50:58 +0200197 struct fio_file *f = io_u->file;
Jens Axboe2866c822006-10-09 15:57:48 +0200198
Jens Axboeaf52b342007-03-13 10:07:47 +0100199 if (f->filetype == FIO_TYPE_BD)
Jens Axboe53cdc682006-10-18 11:50:58 +0200200 return fio_sgio_ioctl_doio(td, f, io_u);
201
Jens Axboe2b13e712011-01-19 14:04:16 -0700202 return fio_sgio_rw_doio(f, io_u, do_sync);
Jens Axboe2866c822006-10-09 15:57:48 +0200203}
204
Jens Axboe2866c822006-10-09 15:57:48 +0200205static int fio_sgio_prep(struct thread_data *td, struct io_u *io_u)
206{
207 struct sg_io_hdr *hdr = &io_u->hdr;
208 struct sgio_data *sd = td->io_ops->data;
209 int nr_blocks, lba;
210
Jens Axboecec6b552007-02-06 20:15:38 +0100211 if (io_u->xfer_buflen & (sd->bs - 1)) {
Jens Axboe2866c822006-10-09 15:57:48 +0200212 log_err("read/write not sector aligned\n");
213 return EINVAL;
214 }
215
Jens Axboe2866c822006-10-09 15:57:48 +0200216 if (io_u->ddir == DDIR_READ) {
Jens Axboe87dc1ab2006-10-24 14:41:26 +0200217 sgio_hdr_init(sd, hdr, io_u, 1);
218
Jens Axboe2866c822006-10-09 15:57:48 +0200219 hdr->dxfer_direction = SG_DXFER_FROM_DEV;
220 hdr->cmdp[0] = 0x28;
Jens Axboe87dc1ab2006-10-24 14:41:26 +0200221 } else if (io_u->ddir == DDIR_WRITE) {
222 sgio_hdr_init(sd, hdr, io_u, 1);
223
Jens Axboe2866c822006-10-09 15:57:48 +0200224 hdr->dxfer_direction = SG_DXFER_TO_DEV;
225 hdr->cmdp[0] = 0x2a;
Jens Axboe87dc1ab2006-10-24 14:41:26 +0200226 } else {
227 sgio_hdr_init(sd, hdr, io_u, 0);
228
229 hdr->dxfer_direction = SG_DXFER_NONE;
230 hdr->cmdp[0] = 0x35;
Jens Axboe2866c822006-10-09 15:57:48 +0200231 }
232
Jens Axboe87dc1ab2006-10-24 14:41:26 +0200233 if (hdr->dxfer_direction != SG_DXFER_NONE) {
Jens Axboecec6b552007-02-06 20:15:38 +0100234 nr_blocks = io_u->xfer_buflen / sd->bs;
Jens Axboe87dc1ab2006-10-24 14:41:26 +0200235 lba = io_u->offset / sd->bs;
Jens Axboe1e97cce2006-12-05 11:44:16 +0100236 hdr->cmdp[2] = (unsigned char) ((lba >> 24) & 0xff);
237 hdr->cmdp[3] = (unsigned char) ((lba >> 16) & 0xff);
238 hdr->cmdp[4] = (unsigned char) ((lba >> 8) & 0xff);
239 hdr->cmdp[5] = (unsigned char) (lba & 0xff);
240 hdr->cmdp[7] = (unsigned char) ((nr_blocks >> 8) & 0xff);
241 hdr->cmdp[8] = (unsigned char) (nr_blocks & 0xff);
Jens Axboe87dc1ab2006-10-24 14:41:26 +0200242 }
243
Jens Axboe2866c822006-10-09 15:57:48 +0200244 return 0;
245}
246
247static int fio_sgio_queue(struct thread_data *td, struct io_u *io_u)
248{
249 struct sg_io_hdr *hdr = &io_u->hdr;
Jens Axboef6db4fa2009-06-16 23:23:01 +0200250 int ret, do_sync = 0;
Jens Axboe2866c822006-10-09 15:57:48 +0200251
Jens Axboe7101d9c2007-09-12 13:12:39 +0200252 fio_ro_check(td, io_u);
253
Jens Axboef6db4fa2009-06-16 23:23:01 +0200254 if (td->o.sync_io || td->o.odirect || ddir_sync(io_u->ddir))
255 do_sync = 1;
256
257 ret = fio_sgio_doio(td, io_u, do_sync);
Jens Axboe2866c822006-10-09 15:57:48 +0200258
259 if (ret < 0)
260 io_u->error = errno;
261 else if (hdr->status) {
262 io_u->resid = hdr->resid;
263 io_u->error = EIO;
264 }
265
Jens Axboe95bcd812007-02-11 01:01:57 +0100266 if (io_u->error) {
Jens Axboee1161c32007-02-22 19:36:48 +0100267 td_verror(td, io_u->error, "xfer");
Jens Axboe36167d82007-02-18 05:41:31 +0100268 return FIO_Q_COMPLETED;
Jens Axboe95bcd812007-02-11 01:01:57 +0100269 }
270
Jens Axboe36167d82007-02-18 05:41:31 +0100271 return ret;
Jens Axboe2866c822006-10-09 15:57:48 +0200272}
273
274static struct io_u *fio_sgio_event(struct thread_data *td, int event)
275{
276 struct sgio_data *sd = td->io_ops->data;
277
278 return sd->events[event];
279}
280
281static int fio_sgio_get_bs(struct thread_data *td, unsigned int *bs)
282{
283 struct sgio_data *sd = td->io_ops->data;
Jens Axboe2039ab12010-08-27 09:04:00 +0200284 struct io_u io_u;
Jens Axboe2866c822006-10-09 15:57:48 +0200285 struct sg_io_hdr *hdr;
286 unsigned char buf[8];
287 int ret;
288
Jens Axboe2039ab12010-08-27 09:04:00 +0200289 memset(&io_u, 0, sizeof(io_u));
290 io_u.file = td->files[0];
Jens Axboe2866c822006-10-09 15:57:48 +0200291
Jens Axboe2039ab12010-08-27 09:04:00 +0200292 hdr = &io_u.hdr;
293 sgio_hdr_init(sd, hdr, &io_u, 0);
Jens Axboe2866c822006-10-09 15:57:48 +0200294 memset(buf, 0, sizeof(buf));
295
296 hdr->cmdp[0] = 0x25;
297 hdr->dxfer_direction = SG_DXFER_FROM_DEV;
298 hdr->dxferp = buf;
299 hdr->dxfer_len = sizeof(buf);
300
Jens Axboe2039ab12010-08-27 09:04:00 +0200301 ret = fio_sgio_doio(td, &io_u, 1);
302 if (ret)
Jens Axboe2866c822006-10-09 15:57:48 +0200303 return ret;
Jens Axboe2866c822006-10-09 15:57:48 +0200304
305 *bs = (buf[4] << 24) | (buf[5] << 16) | (buf[6] << 8) | buf[7];
Jens Axboe2866c822006-10-09 15:57:48 +0200306 return 0;
307}
308
309static void fio_sgio_cleanup(struct thread_data *td)
310{
Jens Axboedc0deca2007-02-08 20:59:31 +0100311 struct sgio_data *sd = td->io_ops->data;
312
313 if (sd) {
314 free(sd->events);
315 free(sd->cmds);
316 free(sd->fd_flags);
317 free(sd->pfds);
318 free(sd->sgbuf);
319 free(sd);
Jens Axboe2866c822006-10-09 15:57:48 +0200320 }
321}
322
323static int fio_sgio_init(struct thread_data *td)
324{
325 struct sgio_data *sd;
Jens Axboe2866c822006-10-09 15:57:48 +0200326
327 sd = malloc(sizeof(*sd));
Jens Axboecb781c72006-11-07 14:02:48 +0100328 memset(sd, 0, sizeof(*sd));
Jens Axboe2dc1bbe2007-03-15 15:01:33 +0100329 sd->cmds = malloc(td->o.iodepth * sizeof(struct sgio_cmd));
330 memset(sd->cmds, 0, td->o.iodepth * sizeof(struct sgio_cmd));
331 sd->events = malloc(td->o.iodepth * sizeof(struct io_u *));
332 memset(sd->events, 0, td->o.iodepth * sizeof(struct io_u *));
333 sd->pfds = malloc(sizeof(struct pollfd) * td->o.nr_files);
334 memset(sd->pfds, 0, sizeof(struct pollfd) * td->o.nr_files);
335 sd->fd_flags = malloc(sizeof(int) * td->o.nr_files);
336 memset(sd->fd_flags, 0, sizeof(int) * td->o.nr_files);
337 sd->sgbuf = malloc(sizeof(struct sg_io_hdr) * td->o.iodepth);
338 memset(sd->sgbuf, 0, sizeof(struct sg_io_hdr) * td->o.iodepth);
Jens Axboedc0deca2007-02-08 20:59:31 +0100339
Jens Axboe2866c822006-10-09 15:57:48 +0200340 td->io_ops->data = sd;
341
Jens Axboeb5af8292007-03-08 12:43:13 +0100342 /*
343 * we want to do it, regardless of whether odirect is set or not
344 */
Jens Axboe2dc1bbe2007-03-15 15:01:33 +0100345 td->o.override_sync = 1;
Jens Axboeb5af8292007-03-08 12:43:13 +0100346 return 0;
347}
348
349static int fio_sgio_type_check(struct thread_data *td, struct fio_file *f)
350{
351 struct sgio_data *sd = td->io_ops->data;
352 unsigned int bs;
353
Jens Axboeaf52b342007-03-13 10:07:47 +0100354 if (f->filetype == FIO_TYPE_BD) {
Jens Axboe53cdc682006-10-18 11:50:58 +0200355 if (ioctl(f->fd, BLKSSZGET, &bs) < 0) {
Jens Axboee1161c32007-02-22 19:36:48 +0100356 td_verror(td, errno, "ioctl");
Jens Axboeb5af8292007-03-08 12:43:13 +0100357 return 1;
Jens Axboe2866c822006-10-09 15:57:48 +0200358 }
Jens Axboeaf52b342007-03-13 10:07:47 +0100359 } else if (f->filetype == FIO_TYPE_CHAR) {
Jens Axboeb5af8292007-03-08 12:43:13 +0100360 int version, ret;
Jens Axboe2866c822006-10-09 15:57:48 +0200361
Jens Axboe53cdc682006-10-18 11:50:58 +0200362 if (ioctl(f->fd, SG_GET_VERSION_NUM, &version) < 0) {
Jens Axboee1161c32007-02-22 19:36:48 +0100363 td_verror(td, errno, "ioctl");
Jens Axboeb5af8292007-03-08 12:43:13 +0100364 return 1;
Jens Axboe2866c822006-10-09 15:57:48 +0200365 }
366
367 ret = fio_sgio_get_bs(td, &bs);
368 if (ret)
Jens Axboeb5af8292007-03-08 12:43:13 +0100369 return 1;
Jens Axboe2866c822006-10-09 15:57:48 +0200370 } else {
Gurudas Paid0c70932008-05-30 13:35:00 +0200371 log_err("ioengine sg only works on block devices\n");
Jens Axboeb5af8292007-03-08 12:43:13 +0100372 return 1;
Jens Axboe2866c822006-10-09 15:57:48 +0200373 }
374
375 sd->bs = bs;
376
Jens Axboeaf52b342007-03-13 10:07:47 +0100377 if (f->filetype == FIO_TYPE_BD) {
Jens Axboe36167d82007-02-18 05:41:31 +0100378 td->io_ops->getevents = NULL;
379 td->io_ops->event = NULL;
380 }
Jens Axboe2866c822006-10-09 15:57:48 +0200381
Jens Axboe2866c822006-10-09 15:57:48 +0200382 return 0;
Jens Axboeb5af8292007-03-08 12:43:13 +0100383}
384
385static int fio_sgio_open(struct thread_data *td, struct fio_file *f)
386{
387 struct sgio_data *sd = td->io_ops->data;
388 int ret;
389
390 ret = generic_open_file(td, f);
391 if (ret)
392 return ret;
393
Jens Axboe15ba6402007-04-02 10:51:10 +0200394 if (sd && !sd->type_checked && fio_sgio_type_check(td, f)) {
Jens Axboe6977bcd2008-03-01 15:55:36 +0100395 ret = generic_close_file(td, f);
Jens Axboeb5af8292007-03-08 12:43:13 +0100396 return 1;
397 }
398
399 return 0;
Jens Axboe2866c822006-10-09 15:57:48 +0200400}
401
Jens Axboe5f350952006-11-07 15:20:59 +0100402static struct ioengine_ops ioengine = {
Jens Axboe2866c822006-10-09 15:57:48 +0200403 .name = "sg",
404 .version = FIO_IOOPS_VERSION,
405 .init = fio_sgio_init,
406 .prep = fio_sgio_prep,
407 .queue = fio_sgio_queue,
408 .getevents = fio_sgio_getevents,
409 .event = fio_sgio_event,
410 .cleanup = fio_sgio_cleanup,
Jens Axboeb5af8292007-03-08 12:43:13 +0100411 .open_file = fio_sgio_open,
412 .close_file = generic_close_file,
Jens Axboedf9c26b2009-03-05 10:13:58 +0100413 .get_file_size = generic_get_file_size,
Jens Axboeb2a15192006-10-18 14:10:42 +0200414 .flags = FIO_SYNCIO | FIO_RAWIO,
Jens Axboe2866c822006-10-09 15:57:48 +0200415};
Jens Axboe34cfcda2006-11-03 14:00:45 +0100416
417#else /* FIO_HAVE_SGIO */
418
419/*
420 * When we have a proper configure system in place, we simply wont build
421 * and install this io engine. For now install a crippled version that
422 * just complains and fails to load.
423 */
424static int fio_sgio_init(struct thread_data fio_unused *td)
425{
Jens Axboea3edaf72010-09-26 10:53:40 +0900426 log_err("fio: ioengine sg not available\n");
Jens Axboe34cfcda2006-11-03 14:00:45 +0100427 return 1;
428}
429
Jens Axboe5f350952006-11-07 15:20:59 +0100430static struct ioengine_ops ioengine = {
Gurudas Paid0c70932008-05-30 13:35:00 +0200431 .name = "sg",
Jens Axboe34cfcda2006-11-03 14:00:45 +0100432 .version = FIO_IOOPS_VERSION,
433 .init = fio_sgio_init,
434};
435
436#endif
Jens Axboe5f350952006-11-07 15:20:59 +0100437
438static void fio_init fio_sgio_register(void)
439{
440 register_ioengine(&ioengine);
441}
442
443static void fio_exit fio_sgio_unregister(void)
444{
445 unregister_ioengine(&ioengine);
446}