CTL_LUN_RESERVED
if ((lun->flags & CTL_LUN_RESERVED)
lun->flags &= ~CTL_LUN_RESERVED;
if ((lun->flags & CTL_LUN_RESERVED) && (lun->res_idx == initidx))
lun->flags &= ~CTL_LUN_RESERVED;
if ((lun->flags & CTL_LUN_RESERVED) && (lun->res_idx == residx))
lun->flags &= ~CTL_LUN_RESERVED;
if ((lun->flags & CTL_LUN_RESERVED) && (lun->res_idx != residx)) {
lun->flags |= CTL_LUN_RESERVED;