Reduce loop from running through all elements
- Just addign a 'last' statement once an extent is found. No since looking for more after the extent is found because there is no more. Should make plugin run a bit faster.
This commit is contained in:
		
							parent
							
								
									11dc7e78bd
								
							
						
					
					
						commit
						91c192f349
					
				| 
						 | 
					@ -695,6 +695,7 @@ sub freenas_list_lu {
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                        $node->{$freenas_api_variables->{'lunid'}} .= $iscsi_lunid;
 | 
					                        $node->{$freenas_api_variables->{'lunid'}} .= $iscsi_lunid;
 | 
				
			||||||
                        push(@luns , $node);
 | 
					                        push(@luns , $node);
 | 
				
			||||||
 | 
					                        last;
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue