@@ -53,6 +53,12 @@ static inline struct iblock_dev *IBLOCK_DEV(struct se_device *dev)
return container_of(dev, struct iblock_dev, dev);
}
+struct request_queue *ibock_se_device_to_q(struct se_device *dev)
+{
+ struct iblock_dev *ib_dev = IBLOCK_DEV(dev);
+ return bdev_get_queue(ib_dev->ibd_bd);
+}
+EXPORT_SYMBOL(ibock_se_device_to_q);
static struct se_subsystem_api iblock_template;
@@ -139,4 +139,8 @@ int se_dev_set_max_sectors(struct se_device *, u32);
int se_dev_set_optimal_sectors(struct se_device *, u32);
int se_dev_set_block_size(struct se_device *, u32);
+/* backend helper to map from se_device to its queue */
+struct request_queue;
+struct request_queue *ibock_se_device_to_q(struct se_device *dev);
+
#endif /* TARGET_CORE_BACKEND_H */