Steve, Jeff,
A write to a file will change the file size attribute in the directory entry, which will of course change the mod time on the directory itself.
In fact, if you don't have "atime update" turned OFF, even opening a file will change the directory mod time since the access time attribute for the file needs to be updated in the directory entry.
Remember, in WAFL all metadata lives in files. That includes directories. So ANY change to a directory entry will cause the modification time on the directory to be updated. This will in turn change the mod time on all relevant parent directories up to the root. On a traditional filesystem like NTFS or UFS this would be a performance disaster as it would generate lots of additional seeks, so they don't do it. However in WAFL an change to a file will cause all relevant metadata inodes up to the root inode to be rewritten [in new locations without seeks] anyway, without a performance cost.
Hope this helps.
The file size, timestamps, and other metadata are stored in the file's inode. The inode is not stored in the directory. All the inodes for the entire volume are stored together in a table. (This table is actually a hidden file in the volume.)
A directory is a list of "dirents" (directory entries). A dirent consists of a file name and an inode number. The inode number is the index into inode table for the file's inode. In order to trip the mod time of a directory you need to either
1) add a dirent such as by creating a new file, or
2) remove a dirent by removing a file or
3) modify a dirent by renaming a file. (Renaming is often done by creating a new dirent and deleting the old one.)
Simply opening an existing file does nothing to its dirent, so it does not modify the directory. Of course any time that you search a directory, you trip its atime (access time).
Steve Losen scl@virginia.edu phone: 434-924-0640
University of Virginia ITC Unix Support