Linux 2.6.26 compat, lookup_bdev()
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 28 Jan 2013 22:15:39 +0000 (14:15 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 28 Jan 2013 23:35:00 +0000 (15:35 -0800)
commit2b7ab9d4d9b307c354795e2805ff313ddd01985d
treed58656a05ce0968b6d931bc36b0ef7bdaeb5c0ca
parent930b6fec210d828cb3755f8756dbbbf3001cccae
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
config/kernel-lookup-bdev.m4 [new file with mode: 0644]
config/kernel.m4
include/linux/blkdev_compat.h