Is there a way to disable the mtime of an filesystem?
There is an Filesystem independend noatime Option, but no "nomtime". Also in the Filesystem specific documentation for ext4 and/or btrfs i couldn't find this.
Does this exist?
Is there a way to disable the mtime of an filesystem?
There is an Filesystem independend noatime Option, but no "nomtime". Also in the Filesystem specific documentation for ext4 and/or btrfs i couldn't find this.
Does this exist?
There is no such option in the kernel.
include/linux/statfs.h:
#define ST_NOATIME 0x0400 /* do not update access times */
#define ST_NODIRATIME 0x0800 /* do not update directory access times */
#define ST_RELATIME 0x1000 /* update atime relative to mtime/ctime */
I cannot think of any functional purpose for this option other than for testing purposes (your use case).
Your options are:
I found that there is the S_NOCMTIME
flag in include/linux/fs.h
:
#define S_NOCMTIME 128 /* Do not update file c/mtime */
which seems to do what's needed. Apparently it's not exposed to users though, but there are examples of using it (just grep for it), so one should be able to hack a little patch for the according file system.
An actual use case would be avoiding inode updates when writing small chunks of data to a fixed-size circular buffer (e.g. to avoid needless erase cycles on NAND-based storage).