Date: Tue, 7 Aug 2018 21:17:45 +0000 (UTC) From: Kirk McKusick <mckusick@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r337437 - head/sbin/mount Message-ID: <201808072117.w77LHjoI070913@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mckusick Date: Tue Aug 7 21:17:45 2018 New Revision: 337437 URL: https://svnweb.freebsd.org/changeset/base/337437 Log: When getting mount information for all filesystems, mount uses the getfsstat(2) system call using the MNT_NOWAIT flag to indicate that it wants to use the statfs information cached in the mount structure. When the -v (verbose) flag is specified, we need to use the MNT_WAIT flag to getfsstat(2) so that kernel will call VFS_STATFS to get the current statfs statistics from each filesystem. Sponsored by: Netflix Modified: head/sbin/mount/mount.c Modified: head/sbin/mount/mount.c ============================================================================== --- head/sbin/mount/mount.c Tue Aug 7 20:43:50 2018 (r337436) +++ head/sbin/mount/mount.c Tue Aug 7 21:17:45 2018 (r337437) @@ -329,7 +329,8 @@ main(int argc, char *argv[]) rval = 0; switch (argc) { case 0: - if ((mntsize = getmntinfo(&mntbuf, MNT_NOWAIT)) == 0) + if ((mntsize = getmntinfo(&mntbuf, + verbose ? MNT_WAIT : MNT_NOWAIT)) == 0) err(1, "getmntinfo"); if (all) { while ((fs = getfsent()) != NULL) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808072117.w77LHjoI070913>