]> sourceware.org Git - lvm2.git/commitdiff
devices: put ifdef around BLKPBSZGET
authorDavid Teigland <teigland@redhat.com>
Thu, 8 Aug 2019 20:43:09 +0000 (15:43 -0500)
committerDavid Teigland <teigland@redhat.com>
Thu, 8 Aug 2019 20:45:03 +0000 (15:45 -0500)
BLKPBSZGET is not defined before kernel version 2.6.32
(e.g. rhel5)

lib/device/dev-io.c

index 8a9ed5c7335212c598ddf65df4356b4f5aefb99a..dd65c3d2ebc54692053786dd372864a108856555 100644 (file)
@@ -200,6 +200,7 @@ int dev_get_direct_block_sizes(struct device *dev, unsigned int *physical_block_
                do_close = 1;
        }
 
+#ifdef BLKPBSZGET /* not defined before kernel version 2.6.32 (e.g. rhel5) */
        /*
         * BLKPBSZGET from kernel comment for blk_queue_physical_block_size:
         * "the lowest possible sector size that the hardware can operate on
@@ -209,6 +210,7 @@ int dev_get_direct_block_sizes(struct device *dev, unsigned int *physical_block_
                stack;
                pbs = 0;
        }
+#endif
 
        /*
         * BLKSSZGET from kernel comment for blk_queue_logical_block_size:
This page took 0.043112 seconds and 5 git commands to generate.