From owner-freebsd-stable Mon Aug 20 3:32:27 2001 Delivered-To: freebsd-stable@freebsd.org Received: from krusty.e-technik.uni-dortmund.de (krusty.E-Technik.Uni-Dortmund.DE [129.217.163.1]) by hub.freebsd.org (Postfix) with ESMTP id 68D0C37B414 for ; Mon, 20 Aug 2001 03:32:25 -0700 (PDT) (envelope-from ma@dt.e-technik.uni-dortmund.de) Received: from emma1.emma.line.org (krusty.dt.e-technik.uni-dortmund.de [129.217.163.1]) by krusty.e-technik.uni-dortmund.de (Postfix) with ESMTP id 9C54EA3826 for ; Mon, 20 Aug 2001 12:32:23 +0200 (CEST) Received: by emma1.emma.line.org (Postfix, from userid 500) id 04A4DA2021; Mon, 20 Aug 2001 12:32:19 +0200 (CEST) To: freebsd-stable@freebsd.org Subject: fsync semantics and directory changes From: Matthias Andree Date: 20 Aug 2001 12:32:19 +0200 Message-ID: Lines: 18 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hail, I'm wondering how to fsync() changes to a directory such as link() with softupdates or async mode. Linux has the "open and fsync the directory" approach. With softupdates, fsync() syncs directory corresponding to the open file handle. However, how do I sync unlinks, for example? Would opening a directory and fsync()ing flush all pending changes to the directory and guarantee fsync() does not return before writes are written (assuming write caches in the disk drive are switched off, of course)? -- Matthias Andree To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message