Date: Sun, 12 Jun 2011 02:05:59 +0000 (UTC) From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r223003 - stable/8/sbin/umount Message-ID: <201106120205.p5C25xoO003478@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rmacklem Date: Sun Jun 12 02:05:59 2011 New Revision: 223003 URL: http://svn.freebsd.org/changeset/base/223003 Log: MFC: r222466 Modify the umount(8) command so that it doesn't do a sync(2) syscall before unmount(2) for the "-f" case. This avoids a forced dismount from getting stuck for an NFS mountpoint in sync() when the server is not responsive. With this commit, forced dismounts should normally work for the NFS clients, but can take up to about 1minute to complete. Modified: stable/8/sbin/umount/umount.c Directory Properties: stable/8/sbin/umount/ (props changed) Modified: stable/8/sbin/umount/umount.c ============================================================================== --- stable/8/sbin/umount/umount.c Sun Jun 12 01:48:31 2011 (r223002) +++ stable/8/sbin/umount/umount.c Sun Jun 12 02:05:59 2011 (r223003) @@ -90,9 +90,6 @@ main(int argc, char *argv[]) struct statfs *mntbuf, *sfs; struct addrinfo hints; - /* Start disks transferring immediately. */ - sync(); - all = errs = 0; while ((ch = getopt(argc, argv, "AaF:fh:t:v")) != -1) switch (ch) { @@ -127,6 +124,10 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; + /* Start disks transferring immediately. */ + if ((fflag & MNT_FORCE) == 0) + sync(); + if ((argc == 0 && !all) || (argc != 0 && all)) usage();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106120205.p5C25xoO003478>