unsigned long flag;
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0))
+ bio_end_io_acct(bio, cmd->start_time);
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
struct hd_struct *part = disk_map_sector_rcu(dev->gd, bio_start(bio));
generic_end_io_acct(dev->rq, rw, part, cmd->start_time);
#elif ((LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0)) || (defined RHEL_MAJOR && RHEL_MAJOR == 6 && RHEL_MINOR >= 7))
unsigned long flag;
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0))
+ cmd->start_time = bio_start_io_acct(bio);
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
struct hd_struct *part = disk_map_sector_rcu(dev->gd, bio_start(bio));
generic_start_io_acct(dev->rq, rw, bio_sectors(bio), part);
+ cmd->start_time = jiffies;
#elif ((LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0)) || (defined RHEL_MAJOR && RHEL_MAJOR == 6 && RHEL_MINOR >= 7))
int cpu = part_stat_lock();
struct hd_struct *part = disk_map_sector_rcu(dev->gd, bio_start(bio));
part_stat_add(cpu, part, sectors[rw], bio_sectors(bio));
part_inc_in_flight(part, rw);
part_stat_unlock();
+ cmd->start_time = jiffies;
#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27))
int cpu = part_stat_lock();
struct hd_struct *part = &dev->gd->part0;
spin_unlock_irqrestore(&dev->in_flight_lock,flag);
part_stat_unlock();
+ cmd->start_time = jiffies;
#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,14))
preempt_disable();
spin_unlock_irqrestore(&dev->in_flight_lock,flag);
preempt_enable();
+ cmd->start_time = jiffies;
#else
preempt_disable();
disk_round_stats(dev->gd);
spin_unlock_irqrestore(&dev->in_flight_lock,flag);
preempt_enable();
-
-#endif
-
cmd->start_time = jiffies;
+#endif
}
/* io */