From 49ae6be0174253f0a93ae1ea297622351e4df2d0 Mon Sep 17 00:00:00 2001 From: vs Date: Thu, 23 Oct 2008 14:20:03 +0000 Subject: [PATCH] b=11063 i=green,vitaly this patch reverses https://bugzilla.lustre.org/attachment.cgi?id=7933 https://bugzilla.lustre.org/attachment.cgi?id=7882 https://bugzilla.lustre.org/attachment.cgi?id=15831 and replaces them with setting mtime to past under extent lock sanity test (39c) is added to check original problem i=adilger,grev --- lustre/utils/lustre_cfg.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lustre/utils/lustre_cfg.c b/lustre/utils/lustre_cfg.c index 9844c13..36608d3 100644 --- a/lustre/utils/lustre_cfg.c +++ b/lustre/utils/lustre_cfg.c @@ -745,7 +745,12 @@ int jt_lcfg_setparam(int argc, char **argv) } /* Write the new value to the file */ fp = open(glob_info.gl_pathv[i], O_WRONLY); - if (fp > 0) { + if (fp == -1) { + fprintf(stderr, "error: %s: %s opening %s\n", + jt_cmdname(argv[0]), strerror(rc = errno), + glob_info.gl_pathv[i]); + break; + } else { rc = write(fp, value, strlen(value)); if (rc < 0) fprintf(stderr, @@ -754,10 +759,6 @@ int jt_lcfg_setparam(int argc, char **argv) else rc = 0; close(fp); - } else { - fprintf(stderr, "error: %s: %s opening %s\n", - jt_cmdname(argv[0]), strerror(rc = errno), - glob_info.gl_pathv[i]); } } -- 1.8.3.1