Matthew Garrett wrote:>> The other subtlety comes if we add fsync() suppression to laptop mode----- Perhaps this has already been suggested, but rather thanadding all these semantics to the core file-system / kernel routines,wouldn't it be preferable to allow some 'layering' of a pseudo,memory-based file-system, OVER some 'real' file system (OR), definableset of files (under a subdir...or same device...or whatever).

The semantics of when the virtual-fs would sync to the physical-fs/filescontrolled via mount options. Physical disk writes would be controlled byselectively ignoring or honoring various "sync" events (time expired,sync, fsync).

This could allow file-systems with different 'needs' (DB, or otherwise)to be treated differently.

The advantage of another layer, is you could define _how much_ bufferingyou wanted to allocate to a filesystem (or file-set). Maybe it's tolerablelosing a audio-recording of a talk, so large buff + don't sync 'cept whenfull is fine. Sensitive filesystems(or sets) (i.e. db's), could be setwith buffers to hold largest 'single-writes', but sync/fsyncs are whatthey are.

An optimization could provide for read/writes through the user-mem controlledbuffered 'fs', to do direct I/O rather than into normal file-buffs wherepossible, since presumably all accesses to a file would go through thelayer or not.