From owner-freebsd-hackers Wed Aug 18 22:40: 6 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from peach.ocn.ne.jp (peach.ocn.ne.jp [210.145.254.87]) by hub.freebsd.org (Postfix) with ESMTP id ADD24150D2 for ; Wed, 18 Aug 1999 22:40:03 -0700 (PDT) (envelope-from dcs@newsguy.com) Received: from newsguy.com by peach.ocn.ne.jp (8.9.1a/OCN) id OAA12006; Thu, 19 Aug 1999 14:39:47 +0900 (JST) Message-ID: <37BB92E3.3CE11E86@newsguy.com> Date: Thu, 19 Aug 1999 14:15:15 +0900 From: "Daniel C. Sobral" X-Mailer: Mozilla 4.6 [en] (Win98; I) X-Accept-Language: en,pt-BR,ja MIME-Version: 1.0 To: Larry Lile Cc: hackers@FreeBSD.ORG, dlane@yahoo.com Subject: Re: async v. sync v. default mode on ufs References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Larry Lile wrote: > > It was pointed out to me by a co-worker that FreeBSD has actually > three modes of operation for mounting ufs filesystems. Could someone > please explain to me, and him, the differences between the three. There are two kinds of stuff written to the fs: data and metadata. Data is what goes inside files, metadata are things like filenames and sizes (gross simplification, emphasis on gross). Default for FreeBSD is async data and sync data. Sync and Async modes go full sync/async for both metadata and data (in theory, anyway :). The advantage with sync metadata is that the fs never gets "too" damaged. With async metadata writes, the fs can get in a state that fsck won't be able to get back to life. Sync metadata writes will be restricted to recoverable inconsistencies (ie, you may lose files and directories, but not the filesystem). > Also does anyone knows how these compare to sync and async on Linux? Sync and async modes on Linux, last I checked, are like full sync and full async modes on FreeBSD. Then, there is softupdates, which is a whole new ball game. Softupdates is async, but it will order, delete, collapse and expand metadata writes so the file system will never get in an inconsistent state. > > Just a btw, you seem to be able to set sync and async on a filesystem > at the same time. What gives? Beats me. > dlane# mount -u -o sync,async,noatime /var dlane-printer# mount > /dev/wd0s1a on / (local, noatime, synchronous, writes: sync 405 async 23) > /dev/wd0s1e on /usr (local, noatime, synchronous, writes: sync 118365 > async 83882) > /dev/wd0s1f on /var (asynchronous, local, noatime, synchronous, writes: > sync 93 async 216) procfs on /proc (local) > dlane# > > /var looks questionable... Indeed. :-) > I would never try that on purpose, but it just kinda happened, and when I > looked at it I though "wow that's broken"! Looks that way. Try opening a PR. :-) -- Daniel C. Sobral (8-DCS) dcs@newsguy.com dcs@freebsd.org - Can I speak to your superior? - There's some religious debate on that question. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message