开发者

handle, transaction and journal

I was looking at the source 开发者_StackOverflow社区code for the implementation of journaling in ext3 and I came across the types handle_t, transaction_t and journal_t.

handle_t represents a single atomic update being performed by a process. transaction_t represents a compound set of atomic updates and journal_t maintains all journaling information for a single filesystem.

I have the following doubts:-

  1. How are a set of disk interactions grouped into various transactions?
  2. An example of a handle and a transaction, please.


Few examples to explain few scenarios.

A. Move one file one one place to another in same filesystem. This will have several tasks a. make entry into new directory file b. Delete entry from old file In this A is transaction and a,b are handles.

B. Writing to a file Tasks involved are a. changing content of the changed block. b. change last modified time in inode. In this B is transaction and a,b are handles.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜