From owner-svn-src-user@freebsd.org Mon Nov 30 09:31:48 2015 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABF4AA3CC64 for ; Mon, 30 Nov 2015 09:31:48 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 752C11FA4; Mon, 30 Nov 2015 09:31:48 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAU9VlL1050689; Mon, 30 Nov 2015 09:31:47 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAU9VlFl050687; Mon, 30 Nov 2015 09:31:47 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201511300931.tAU9VlFl050687@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Mon, 30 Nov 2015 09:31:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r291482 - user/pho/stress2/lib X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 09:31:48 -0000 Author: pho Date: Mon Nov 30 09:31:47 2015 New Revision: 291482 URL: https://svnweb.freebsd.org/changeset/base/291482 Log: Fix trailing white space and flush stdout. Sponsored by: EMC / Isilon storage division Modified: user/pho/stress2/lib/options.c user/pho/stress2/lib/resources.c Modified: user/pho/stress2/lib/options.c ============================================================================== --- user/pho/stress2/lib/options.c Mon Nov 30 09:24:12 2015 (r291481) +++ user/pho/stress2/lib/options.c Mon Nov 30 09:31:47 2015 (r291482) @@ -139,7 +139,7 @@ environment(void) usage("INODES"); } } - + void options(int argc, char **argv) { @@ -220,6 +220,7 @@ show_status(void) printf("%8s: run time %2d+%s, incarnations %3d, load %3d, verbose %d\n", getprogname(), days, buf, op->incarnations, op->load, op->verbose); + fflush(stdout); } } Modified: user/pho/stress2/lib/resources.c ============================================================================== --- user/pho/stress2/lib/resources.c Mon Nov 30 09:24:12 2015 (r291481) +++ user/pho/stress2/lib/resources.c Mon Nov 30 09:31:47 2015 (r291482) @@ -167,6 +167,9 @@ getdf(int64_t *block, int64_t *inode) O_CREAT | O_TRUNC | O_WRONLY | O_EXCL, 0644)) != -1) break; usleep(10000); /* sleep 1/100 sec */ + if (i > 0 && i % 1000 == 0) + fprintf(stderr, "%s is waiting for lock file %s\n", + getprogname(), lockpath); } if (lockfd != -1) break; @@ -222,7 +225,7 @@ reservedf(int64_t blks, int64_t inos) getprogname(), blks/1024, inos, blocks/1024, inodes); blocks -= blks; inodes -= inos; - + snprintf(buf, sizeof(buf), "%jd %jd", blocks, inodes); if (blocks < 0 || inodes < 0) printf("******************************** %s: %s\n", getprogname(), buf);