diff options
author | Coleman Kane <[email protected]> | 2021-02-22 21:07:51 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2021-02-24 10:04:34 -0800 |
commit | d939930fccbf7382c3525bba59cc04e9afc28fdc (patch) | |
tree | adfcf7f29e7a2b504cdf1fef6708ce6abe740b85 /module | |
parent | 8e43fa12c571878f32119122771888ab9092a75a (diff) |
Linux 5.12 compat: bio->bi_disk member moved
The struct bio member bi_disk was moved underneath a new member named
bi_bdev. So all attempts to reference bio->bi_disk need to now become
bio->bi_bdev->bd_disk.
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Coleman Kane <[email protected]>
Closes #11639
Diffstat (limited to 'module')
-rw-r--r-- | module/os/linux/zfs/vdev_disk.c | 4 | ||||
-rw-r--r-- | module/os/linux/zfs/zvol_os.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/module/os/linux/zfs/vdev_disk.c b/module/os/linux/zfs/vdev_disk.c index b373f2c2e..ff71ef4cd 100644 --- a/module/os/linux/zfs/vdev_disk.c +++ b/module/os/linux/zfs/vdev_disk.c @@ -494,7 +494,11 @@ vdev_blkg_tryget(struct blkcg_gq *blkg) static inline void vdev_bio_associate_blkg(struct bio *bio) { +#if defined(HAVE_BIO_BDEV_DISK) + struct request_queue *q = bio->bi_bdev->bd_disk->queue; +#else struct request_queue *q = bio->bi_disk->queue; +#endif ASSERT3P(q, !=, NULL); ASSERT3P(bio->bi_blkg, ==, NULL); diff --git a/module/os/linux/zfs/zvol_os.c b/module/os/linux/zfs/zvol_os.c index 0caf31307..0d62b1490 100644 --- a/module/os/linux/zfs/zvol_os.c +++ b/module/os/linux/zfs/zvol_os.c @@ -307,8 +307,12 @@ zvol_request(struct request_queue *q, struct bio *bio) #endif { #ifdef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS +#if defined(HAVE_BIO_BDEV_DISK) + struct request_queue *q = bio->bi_bdev->bd_disk->queue; +#else struct request_queue *q = bio->bi_disk->queue; #endif +#endif zvol_state_t *zv = q->queuedata; fstrans_cookie_t cookie = spl_fstrans_mark(); uint64_t offset = BIO_BI_SECTOR(bio) << 9; |