A journaling file system is a file system that records information about pending updates to the file system before committing the updates. This mechanism raises the reliability of the system because it enables any inconsistencies to be repaired with minimal loss of data. Since there is a tradeoff between the overhead and reliability, ext3, a journaling file system commonly used by the Linux kernel, offers three journaling modes: speed-prioritized mode, reliability-prioritized mode, and intermediate mode. Unfortunately, in ext3, the journaling mode has to be set individually for each file system. Thus, the granularity of the journaling mode setting is very coarse. In addition, the journaling mode must be determined at the time of mounting the file system and cannot be changed without unmounting it. To resolve this problem, this paper proposes a new journaling file system named dajFS (per-directory adaptive journaling file system) that is able to set an appropriate journaling mode for each directory and to switch the journaling mode of a directory to another on the fly without unmounting the file system. Essentially, the journaling mode that is specified for a directory applies to all files that reside directly under that directory. By using dajFS, the user can determine and set a journaling mode for each directory on the basis of the importance of files under that directory. As a result, the user can enjoy moderate granularity with the journaling mode setting.