Here is another way of allowing sane access to file system specificinformation, statistics and configuration. It involves using the translationfilesystem (http://trfs.sourceforge.net/). An example of filesystemconfiguration: configurable forcing data flush for all writes to files in afilesystem, is implemented and is available for download. It is implementedfor ext2tr filesystem, which is ext2 filesystem with few modifications to usethe translation filesystem.

Filesystem views ----------------Filesystem views give information about filesystems and allow users toconfigure them. Filesystem views for files and directories residing in thesame filesystem are identical. They are applicable to the whole filesystem.An example filesystem view fs/config has been provided for ext2tr filesytem.This view can be used to configure the filesystem to immediately flush datawritten to files in the filesystem.

Uses of filesystem views -----------------------Filesystems can allow users to configure them through filesystem configurationviews. Although ioctls can be used for the same purpose, using views isbetter. A comparison of ioctls and translation filesystem views is given onthe translation filesystem webpage. A View that gives information for afilesystem can be put into the fs view at fs/info. The view can beinstantiated into a directory which contains text files giving filesysteminformation. Filesystem statistics can be put into fs/stats. fs/config viewcan be used to configure a filesystem.

Example of fs/config view -------------------------The ext2tr filesystem (available from downloads page) contains an exampletranslator for fs/config view. The view instantiates into a directory, whichcontains a file forcedsync. This file is used to control data sync behaviorfor an ext2tr filesystem. If forcedsync file contains a character 0, flagsspecified while opening a file in the filesystem are used to determine whetherdata written to the file is immediately flushed to disk. If forcedsync filecontains a character 1, all data written to a file in the filesystem isimmediately flushed to disk regardless of the flags specified while openingthe file. Contents of the file can be checked by reading it and can be changedby writing to it. A usage of the view is shown below. In the example, ddcommand required 0.10 seconds when forcedsync was not enabled. After enablingforcedsync, dd command required 1.62 seconds because data was being flushed ateach write system call.