summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2013-02-26 11:28:14 -0800
committerBrian Behlendorf <[email protected]>2013-02-28 12:02:59 -0800
commitbd99a7584a3d93cffd6c57ef7b9c80ffd953d913 (patch)
tree737f8d6bc5902964de22fc3b63825b2bb3fe041a /module
parent0d8103d9561bd2314da320dd5d43f9d5e044b64d (diff)
Remove wholedisk check from vdev_disk_open()
As described by the comment and enforced the by assertion the v->vdev_wholedisk will never be -1. The wholedisk handling is performed by the user space utilities. To prevent confusion this dead code is being removed. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module')
-rw-r--r--module/zfs/vdev_disk.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/module/zfs/vdev_disk.c b/module/zfs/vdev_disk.c
index 4e38c7860..f93b7bcc8 100644
--- a/module/zfs/vdev_disk.c
+++ b/module/zfs/vdev_disk.c
@@ -294,20 +294,6 @@ skip_open:
/* Determine the physical block size */
block_size = vdev_bdev_block_size(vd->vd_bdev);
- /* We think the wholedisk property should always be set when this
- * function is called. ASSERT here so if any legitimate cases exist
- * where it's not set, we'll find them during debugging. If we never
- * hit the ASSERT, this and the following conditional statement can be
- * removed. */
- ASSERT3S(v->vdev_wholedisk, !=, -1ULL);
-
- /* The wholedisk property was initialized to -1 in vdev_alloc() if it
- * was unspecified. In that case, check if this is a whole device.
- * When bdev->bd_contains == bdev we have a whole device and not simply
- * a partition. */
- if (v->vdev_wholedisk == -1ULL)
- v->vdev_wholedisk = (bdev->bd_contains == bdev);
-
/* Clear the nowritecache bit, causes vdev_reopen() to try again. */
v->vdev_nowritecache = B_FALSE;