Skip to content

Commit

Permalink
Don't reset notrim after low-level vdev open.
Browse files Browse the repository at this point in the history
Currently, vdev_notrim is set to 0 after the actual vdev has been
opened (e.g. in vdev_disk_open()). This defeats the purpose of setting
vdev_notrim in vdev_disk_open(), so don't do it.
  • Loading branch information
dechamps committed Sep 10, 2012
1 parent 0a616c2 commit 51c1a59
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions module/zfs/vdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1214,10 +1214,8 @@ vdev_open(vdev_t *vd)
if (vd->vdev_ishole || vd->vdev_ops == &vdev_missing_ops)
return (0);

if (vd->vdev_ops->vdev_op_leaf) {
vd->vdev_notrim = B_FALSE;
if (vd->vdev_ops->vdev_op_leaf && !vd->vdev_notrim)
trim_map_create(vd);
}

for (c = 0; c < vd->vdev_children; c++) {
if (vd->vdev_child[c]->vdev_state != VDEV_STATE_HEALTHY) {
Expand Down

0 comments on commit 51c1a59

Please sign in to comment.