mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Linux 2.6.26 compat, lookup_bdev()
It's doubtful many people were impacted by this but commit 6c28567
accidentally broke ZFS builds for 2.6.26 and earlier kernels. This
commit depends on the lookup_bdev() function which exists in 2.6.26
but wasn't exported until 2.6.27.
The availability of the function isn't critical so a wrapper is
introduced which returns ERR_PTR(-ENOTSUP) when the function isn't
defined. This will have the effect of causing zvol_is_zvol() to
always fail for 2.6.26 kernels. This in turn means vdevs will
always get opened concurrently which is good for normal usage.
This will only become an issue if your using a zvol as a vdev in
another pool. In which case you really should be using a newer
kernel anyway.
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1205
This commit is contained in:
@@ -392,6 +392,15 @@ bio_set_flags_failfast(struct block_device *bdev, int *flags)
|
||||
# define vdev_bdev_invalidate(bdev) invalidate_bdev(bdev, 1)
|
||||
#endif /* HAVE_1ARG_INVALIDATE_BDEV */
|
||||
|
||||
/*
|
||||
* 2.6.27 API change
|
||||
* The function was exported for use, prior to this it existed by the
|
||||
* symbol was not exported.
|
||||
*/
|
||||
#ifndef HAVE_LOOKUP_BDEV
|
||||
# define lookup_bdev(path) ERR_PTR(-ENOTSUP)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* 2.6.30 API change
|
||||
* To ensure good performance preferentially use the physical block size
|
||||
|
||||
Reference in New Issue
Block a user