Skip to content

Commit

Permalink
Merge pull request #19 from truenas/NAS-126731
Browse files Browse the repository at this point in the history
NAS-126731 / 24.10/ Disable unused expensive code in addVirtualTarget
  • Loading branch information
bmeagherix authored Jan 25, 2024
2 parents 04850d6 + b1425b5 commit 7ccdcb2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scstadmin/scstadmin.sysfs/scstadmin
Original file line number Diff line number Diff line change
Expand Up @@ -3024,6 +3024,9 @@ sub addVirtualTarget {
my $errorString;
my $targets;

# Disable this code. Never used but gets expensive as the
# target count climbs.
if (0) {
# Enable all hardware targets before creating virtual ones
($targets, $errorString) = $SCST->targets($driver);
foreach my $_target (@{$targets}) {
Expand All @@ -3035,6 +3038,7 @@ sub addVirtualTarget {
enableTarget($driver, $_target);
}
}
}

print "\t-> Creating target '$target' for driver '$driver': ";
my $rc = $SCST->addVirtualTarget($driver, $target, $attributes);
Expand Down

0 comments on commit 7ccdcb2

Please sign in to comment.