xfs
[Top] [All Lists]

Re: vim file write mode on journaling fs.

To: Bram Moolenaar <Bram@xxxxxxxxxxxxx>
Subject: Re: vim file write mode on journaling fs.
From: Andi Kleen <ak@xxxxxxx>
Date: Sun, 12 Aug 2001 04:44:02 +0200
Cc: Russell Cattelan <cattelan@xxxxxxxxxxx>, Seth Mos <knuffie@xxxxxxxxx>, Linux XFS Mailing List <linux-xfs@xxxxxxxxxxx>
In-reply-to: <200108111848.f7BIm1704198@moolenaar.net>; from Bram@moolenaar.net on Sat, Aug 11, 2001 at 08:48:01PM +0200
References: <3B75549D.96EEE5EB@thebarn.com> <200108111848.f7BIm1704198@moolenaar.net>
Sender: owner-linux-xfs@xxxxxxxxxxx
User-agent: Mutt/1.2.5i
On Sat, Aug 11, 2001 at 08:48:01PM +0200, Bram Moolenaar wrote:
> What tools do I have that indicate to the FS how it should handle the data I
> have written?  Can I somehow tell it to flush my data soon, but not as drastic
> as syncing?

You could use fsync before the close. Then the write will be async, but at
the end there is a flush forced. This should also give you efficient 
extent allocation on XFS. For ext2 you should also fdatasync the directory
to make sure that the filename really has reached disk and won't hit
lost+found.

BTW while at it you could also make vim use rename+unlink of the old file 
instead of O_TRUNC for file writing,
then it would do COW in hardlinked trees, not requiring me to keep a clumpsy
wrapper around for that.

-Andi


<Prev in Thread] Current Thread [Next in Thread>