Journaling File System里的writeback mode和ordered mode的详细解释

1630阅读 0评论2014-05-26 almeydifer
分类:LINUX



In both the modes only filesystem metadata is written into the journal. The difference between writeback mode and ordered mode is that in Ordered mode filesystem groups metadata and relative data blocks so that data blocks are written to disk before the metadata is logged while in ordered only metadata is logged (& data blocks are not written into disk at all).

ii. From the implementation perspective(in terms of ext3), in ordered mode an additional function journal_dirty_data( ) is invoked on every buffer of data in the page to insert the buffer in a proper list of the active transactions. The JBD layer ensures that all buffers in this list are written to disk before the metadata buffers of the transaction.After that generic_commit_write( ) function is invoked, which inserts the data buffers in the list of the dirty buffers of the owner inode. In writeback mode , no such function like journal_dirty_data( ) is invoked on data buffers and only generic_commit_write( ) is called.
上一篇:QCOW2的一张大图
下一篇:没有了