From owner-freebsd-fs@FreeBSD.ORG Fri Feb 13 01:16:35 2004 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 590A016A4CE for ; Fri, 13 Feb 2004 01:16:35 -0800 (PST) Received: from mail.synology.com (dns1.synology.com [210.202.102.129]) by mx1.FreeBSD.org (Postfix) with ESMTP id 32DA043D1F for ; Fri, 13 Feb 2004 01:16:34 -0800 (PST) (envelope-from rjshang@synology.com) Received: from synology.com (localhost.synology.com [127.0.0.1]) by mail.synology.com (8.12.11/8.12.11) with ESMTP id i1D9GHFQ014682 for ; Fri, 13 Feb 2004 17:16:17 +0800 (CST) From: "rjshang" To: freebsd-fs@freebsd.org Date: Fri, 13 Feb 2004 17:16:17 +0800 Message-Id: <20040213091617.M29405@synology.com> X-Mailer: Open WebMail 1.81 20021127 X-OriginatingIP: 192.168.101.227 (rjshang) MIME-Version: 1.0 Content-Type: text/plain; charset=big5 Subject: Is that a typo in ffs_softdep.c X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2004 09:16:35 -0000 Hi, there, It looks like a typo in ffs_softdep.c softdep_sync_metadata(). The second parameter of drain_output is used to tell if it is protected by &lk. Is there other concern? Please check the following patch from 4.9 release. Thanks! R.J. Shang ************************************************************************* --- ffs_softdep.c Wed Feb 6 02:46:53 2002 +++ ffs_softdep.new.c Fri Feb 13 16:48:52 2004 @@ -4299,29 +4299,29 @@ return (0); } FREE_LOCK(&lk); /* * If we are trying to sync a block device, some of its buffers may * contain metadata that cannot be written until the contents of some * partially written files have been written to disk. The only easy * way to accomplish this is to sync the entire filesystem (luckily * this happens rarely). * * We must wait for any I/O in progress to finish so that * all potential buffers on the dirty list will be visible. */ - drain_output(vp, 1); + drain_output(vp, 0); if (vn_isdisk(vp, NULL) && vp->v_specmountpoint && !VOP_ISLOCKED(vp, NULL) && (error = VFS_SYNC(vp->v_specmountpoint, MNT_WAIT, ap->a_cred, ap->a_p)) != 0) return (error); return (0); } /* * Flush the dependencies associated with an inodedep. * Called with splbio blocked. */ static int flush_inodedep_deps(fs, ino)