aboutsummaryrefslogtreecommitdiffstats
path: root/include/os
diff options
context:
space:
mode:
authorRich Ercolani <[email protected]>2023-03-27 14:29:19 -0400
committerGitHub <[email protected]>2023-03-27 11:29:19 -0700
commitae0b1f66c707cff09bfde54aade784a016559a34 (patch)
tree321bafb9b476cec032159af1d08fcfc896e1d459 /include/os
parenta05263b7aa2ae38b50a159b3d2b22f3a454178ab (diff)
linux 6.3 compat: add another bdev_io_acct case
Linux 6.3+, and backports from it (6.2.8+), changed the signatures on bdev_io_{start,end}_acct. Add a case for it. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Rich Ercolani <[email protected]> Closes #14658 Closes #14668
Diffstat (limited to 'include/os')
-rw-r--r--include/os/linux/kernel/linux/blkdev_compat.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/os/linux/kernel/linux/blkdev_compat.h b/include/os/linux/kernel/linux/blkdev_compat.h
index f04eb5b25..c7405ffab 100644
--- a/include/os/linux/kernel/linux/blkdev_compat.h
+++ b/include/os/linux/kernel/linux/blkdev_compat.h
@@ -592,7 +592,10 @@ blk_generic_start_io_acct(struct request_queue *q __attribute__((unused)),
struct gendisk *disk __attribute__((unused)),
int rw __attribute__((unused)), struct bio *bio)
{
-#if defined(HAVE_BDEV_IO_ACCT)
+#if defined(HAVE_BDEV_IO_ACCT_63)
+ return (bdev_start_io_acct(bio->bi_bdev, bio_op(bio),
+ jiffies));
+#elif defined(HAVE_BDEV_IO_ACCT_OLD)
return (bdev_start_io_acct(bio->bi_bdev, bio_sectors(bio),
bio_op(bio), jiffies));
#elif defined(HAVE_DISK_IO_ACCT)
@@ -618,7 +621,10 @@ blk_generic_end_io_acct(struct request_queue *q __attribute__((unused)),
struct gendisk *disk __attribute__((unused)),
int rw __attribute__((unused)), struct bio *bio, unsigned long start_time)
{
-#if defined(HAVE_BDEV_IO_ACCT)
+#if defined(HAVE_BDEV_IO_ACCT_63)
+ bdev_end_io_acct(bio->bi_bdev, bio_op(bio), bio_sectors(bio),
+ start_time);
+#elif defined(HAVE_BDEV_IO_ACCT_OLD)
bdev_end_io_acct(bio->bi_bdev, bio_op(bio), start_time);
#elif defined(HAVE_DISK_IO_ACCT)
disk_end_io_acct(disk, bio_op(bio), start_time);