Re: 2.6: marking individual directories as synchronous?

From: Carl Spalletta (
Date: Tue Jul 22 2003 - 08:20:19 EST

Grepping around in 2.6.0-test1 src I found:

105 #define MS_DIRSYNC 128 /* Directory modifications are synchronous */
138 #define S_DIRSYNC 128 /* Directory modifications are synchronous */

Therefore, study the definitions and uses of those flags as well as
IS_DIRSYNC(), EXT3_DIRSYNC_FL, ext3_ioctl() & ext3_set_inode_flags().

For example:
[linux-2.6.0-test1]$ cscope -d -L -3 IS_DIRSYNC
fs/ext2/dir.c ext2_commit_chunk 71 if (IS_DIRSYNC(dir))
fs/ext3/ialloc.c ext3_new_inode 585 if (IS_DIRSYNC(inode))
fs/ext3/namei.c ext3_create 1638 if (IS_DIRSYNC(dir))
fs/ext3/namei.c ext3_mknod 1665 if (IS_DIRSYNC(dir))
fs/ext3/namei.c ext3_mkdir 1697 if (IS_DIRSYNC(dir))
fs/ext3/namei.c ext3_rmdir 1981 if (IS_DIRSYNC(dir))
fs/ext3/namei.c ext3_unlink 2033 if (IS_DIRSYNC(dir))
fs/ext3/namei.c ext3_symlink 2089 if (IS_DIRSYNC(dir))
fs/ext3/namei.c ext3_link 2139 if (IS_DIRSYNC(dir))
fs/minix/dir.c dir_commit_chunk 53 if (IS_DIRSYNC(dir))
fs/sysv/dir.c dir_commit_chunk 46 if (IS_DIRSYNC(dir))
fs/ufs/dir.c ufs_set_link 359 if (IS_DIRSYNC(dir))
fs/ufs/dir.c ufs_add_link 458 if (IS_DIRSYNC(dir))
fs/ufs/dir.c ufs_delete_entry 507 if (IS_DIRSYNC(inode))

I haven't actually played with the application of this, but it would appear
to be some combination of ioctl's and/or mount flags. Check the source for
chattr(1) to see if and how it uses the ioctl.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Wed Jul 23 2003 - 22:00:46 EST