From 9f08bad0a88ee70c3f222a6c3d70b681fc01ab03 Mon Sep 17 00:00:00 2001 From: Jerry Jelinek Date: Fri, 28 Jun 2013 21:33:14 +0000 Subject: OS-2351 zone boot crosscheck_zonepaths is O(N^2) --- usr/src/cmd/zoneadm/zoneadm.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/usr/src/cmd/zoneadm/zoneadm.c b/usr/src/cmd/zoneadm/zoneadm.c index 7e5ba5bbfb..81cd59ad70 100644 --- a/usr/src/cmd/zoneadm/zoneadm.c +++ b/usr/src/cmd/zoneadm/zoneadm.c @@ -21,7 +21,7 @@ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, Joyent Inc. All rights reserved. + * Copyright 2013, Joyent Inc. All rights reserved. */ /* @@ -1013,8 +1013,12 @@ validate_zonepath(char *path, int cmd_num) (void) printf(gettext("WARNING: %s is on a temporary " "file system.\n"), rpath); } - if (crosscheck_zonepaths(rpath) != Z_OK) - return (Z_ERR); + if (cmd_num != CMD_BOOT && cmd_num != CMD_REBOOT && + cmd_num != CMD_READY) { + /* we checked when we installed, no need to check each boot */ + if (crosscheck_zonepaths(rpath) != Z_OK) + return (Z_ERR); + } /* * Try to collect and report as many minor errors as possible * before returning, so the user can learn everything that needs -- cgit v1.2.3