HomeFreeBSD

Linux 5.16: use bdev_nr_bytes() to get device capacity

Description

Linux 5.16: use bdev_nr_bytes() to get device capacity

This helper was introduced long ago, in 5.16. Since 6.10, bd_inode no
longer exists, but the helper has been updated, so detect it and use it
in all versions where it is available.

Signed-off-by: Rob Norris <robn@despairlabs.com>
Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>

Details

Provenance
rob.norris_klarasystems.comAuthored on May 28 2024, 8:16 PM
Tony Hutter <hutter2@llnl.gov>Committed on Jul 16 2024, 10:40 PM
Parents
rG3ea3649755d4: Linux 6.10: work harder to avoid kmem_cache_alloc reuse
Branches
Unknown
Tags
Unknown