hd_struct has been merged with block_device by this commit:
0d02129e76edf91cf04fabf1efbc3a9a1f1d729a ("block: merge struct block_device and struct hd_struct")
Update hio to properly support this change.
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
#define hio_warn(f, arg...) printk(KERN_WARNING MODULE_NAME"warn: " f , ## arg)
#define hio_err(f, arg...) printk(KERN_ERR MODULE_NAME"err: " f , ## arg)
#define hio_warn(f, arg...) printk(KERN_WARNING MODULE_NAME"warn: " f , ## arg)
#define hio_err(f, arg...) printk(KERN_ERR MODULE_NAME"err: " f , ## arg)
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(5,6,0))
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(5,6,0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(5,11,0))
struct hd_struct *disk_map_sector_rcu(struct gendisk *disk, sector_t sector);
#endif
struct hd_struct *disk_map_sector_rcu(struct gendisk *disk, sector_t sector);
#endif
static int ssd_update_smart(struct ssd_device *dev, struct ssd_smart *smart)
{
uint64_t cur_time, run_time;
static int ssd_update_smart(struct ssd_device *dev, struct ssd_smart *smart)
{
uint64_t cur_time, run_time;
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
+ struct block_device *part;
+ int cpu;
+#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27))
struct hd_struct *part;
int cpu;
#endif
struct hd_struct *part;
int cpu;
#endif