From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anton Altaparmakov Subject: Re: Postmark on NTFS Date: Fri, 08 Aug 2003 10:48:46 +0100 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <1060336126.6965.8.camel@imp> References: Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: Szakacsits Szabolcs , linux-fsdevel@vger.kernel.org Return-path: Received: from orange.csi.cam.ac.uk ([131.111.8.77]:6360 "EHLO orange.csi.cam.ac.uk") by vger.kernel.org with ESMTP id S267517AbTHHJss (ORCPT ); Fri, 8 Aug 2003 05:48:48 -0400 To: "Charles P. Wright" In-Reply-To: List-Id: linux-fsdevel.vger.kernel.org On Thu, 2003-08-07 at 20:08, Charles P. Wright wrote: > Does NTFS have more synchronous writes or reads than Ext3? Yes, loads more. All metadata writes must either be synchronous OR they must use double buffering. Both cases make it slower than a simple write to disk which can be asynchronous. This is because metadata in ntfs is not written as it is in memory but it is modified - fixups are applied which allow checking for corruption/crashes on read from disk. In the direct write case the metadata is then written to disk, and then the modifications are undone. Obviously, during the time in which the metadata is modified, you cannot change the metadata as for all intents and purposes it is corrupt and unusable. This makes it impossible to make any changes while a write is in progress and all changes are stalled till the write is completed and the fixups are undone. In the double buffered case the metadata is copied, then fixups applied, then written to disk, and then thrown away. There is one complication and that is that the original in-memory metadata must be modified as well to reflect the fact that it was just written to disk (the fixup counter is incremented by one) so even here there is a short period of time during which the original metadata cannot be touched by anyone else. I opted for the direct write approach in the Linux ntfs driver and as far as I have understood the windows ntfs driver, it uses the direct write approach, too. Ext3 doesn't do such metadata fixups which allows its writes to be more flexibly managed. Best regards, Anton -- Anton Altaparmakov (replace at with @) Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/