Messages in this thread | | | Date | Fri, 30 Apr 2004 17:45:17 +0400 | From | Vyacheslav NightFlash <> | Subject | [QUESTION] Atomicity/Journaling in VFS layer |
| |
Seems that all journaling filesystems ordering their ondisk modifications somehow Isn't it better to add ability to order data/metadata modifications to VFS layer?
Also hacking VFS is the only way to provide data consistency if application want "write A" to appear before "write B", but A and B are on different filesystems.
I have some ideas how it could be done, but I dont know VFS much, so I'll be happy to see comments from guru.
1) Every inode keeps list of "atoms".
2) Every "atom" keeps list of modified buffers, that can appear in ondisk FS layout only together.
3) "atom" keeps list of "atom"s, that must be commited before it can start its own writeback.
4) "atom" keeps list of "atom"s that are waiting for its commit, so that they can be marked as "ready for writeback" as a part of its io completition.
5) We can assign virtual inodes to journals & metadata structures, so we can track data-journal-metadata write order using the same "atom dependencies"
6) When process writes to fd new "atom" is created. It initialized so that in could not be written before commit of data that process has read/wrote before this "atom" creation.
7) Every buffer has link to his atom (or NULL if it's clean). So we can add some more "dependencies" to atom that owns buffer.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |