From bdea9d0e92a763a2043a35402b311165328f82ab Mon Sep 17 00:00:00 2001 From: Maurizio Lombardi Date: Thu, 1 Dec 2022 13:42:43 +0100 Subject: [PATCH] rtslib: remove the limit of 255 max mapped LUNs The kernel is able to handle more than 255 LUNs since version 4.2 Signed-off-by: Maurizio Lombardi --- rtslib/target.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/rtslib/target.py b/rtslib/target.py index 1477197..f6b5827 100644 --- a/rtslib/target.py +++ b/rtslib/target.py @@ -1060,8 +1060,6 @@ class MappedLUN(CFSNode): the initiator node as the MappedLUN. ''' - MAX_LUN = 255 - # MappedLUN private stuff def __repr__(self): @@ -1108,9 +1106,8 @@ def __init__(self, parent_nodeacl, mapped_lun, except ValueError: raise RTSLibError("The mapped_lun parameter must be an " \ + "integer value") - - if self._mapped_lun < 0 or self._mapped_lun > self.MAX_LUN: - raise RTSLibError("Mapped LUN must be 0 to %d" % self.MAX_LUN) + if self._mapped_lun < 0: + raise RTSLibError("Mapped LUN must be >= 0") self._path = "%s/lun_%d" % (self.parent_nodeacl.path, self.mapped_lun)