Re: fsync on large files

Bernd Eckenfels (ecki@lina.inka.de)
Sun, 14 Feb 1999 17:43:14 +0100


In article <199902140429.XAA29350@dcl> you wrote:
> What the patch does is keep an array of the last four blocks which were
> modified since the last fsync(). If there have been no more than four
> blocks modified, then the ext2 filesystem can do a "fast fsync", which
> just flushes those four (or fewer) blocks to disk, without having to
> walk all of the indirect blocks looking for modified blocks.

So this is only a problem if additional nodes have to be added to the double
indirect blocks?

> This
> should be extremely effective for programs like syslog which are doing
> frequent fsync()'s with minimal amounts of data written between calls to
> fsync().

Would it be possible to pre-allocate a file until it fills up some double
indirect blocks (i.e. the amount of usual log activity until rotated) and
then write into it (possible with a flag telling the fs that there was no
sarse blocks before?).

Greetings
Bernd

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/