Whamcloud - gitweb
LU-6221 utils: hsm_root is also required for --dry-run 73/13673/2
authorBruno Faccini <bruno.faccini@intel.com>
Fri, 6 Feb 2015 12:13:02 +0000 (13:13 +0100)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 26 Mar 2015 00:01:46 +0000 (00:01 +0000)
Not specifying hsm_root in copytool/lhsmtool_posix command line for
--dry-run mode can lead to failure/error.
This path ensures that hsm_root will be required even for --dry-run.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: Icaa2af6d1365751d9e77b2be3f60aacc9c1f6a5c
Reviewed-on: http://review.whamcloud.com/13673
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/utils/lhsmtool_posix.c

index d1fc084..d19f173 100644 (file)
@@ -347,7 +347,7 @@ static int ct_parseopts(int argc, char * const *argv)
        CT_TRACE("action=%d src=%s dst=%s mount_point=%s",
                 opt.o_action, opt.o_src, opt.o_dst, opt.o_mnt);
 
-       if (!opt.o_dry_run && opt.o_hsm_root == NULL) {
+       if (opt.o_hsm_root == NULL) {
                rc = -EINVAL;
                CT_ERROR(rc, "must specify a root directory for the backend");
                return rc;