- if (td->filetype == FIO_TYPE_BD)
- td->io_ops->getevents = fio_sgio_ioctl_getevents;
- else
- td->io_ops->getevents = fio_sgio_getevents;
+ if (f->filetype == FIO_TYPE_BD) {
+ td->io_ops->getevents = NULL;
+ td->io_ops->event = NULL;
+ }
+
+ return 0;
+}
+
+static int fio_sgio_open(struct thread_data *td, struct fio_file *f)
+{
+ struct sgio_data *sd = td->io_ops->data;
+ int ret;
+
+ ret = generic_open_file(td, f);
+ if (ret)
+ return ret;
+
+ if (!sd->type_checked && fio_sgio_type_check(td, f)) {
+ generic_close_file(td, f);
+ return 1;
+ }