From: vs Date: Thu, 23 Oct 2008 14:20:03 +0000 (+0000) Subject: b=11063 X-Git-Tag: v1_7_130~1^80 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=49ae6be0174253f0a93ae1ea297622351e4df2d0;p=fs%2Flustre-release.git 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 --- 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]); } }