阅读:2358回复:10
请问谁知道NTFS文件系统中的“Update Sequence”是什么意思
请问谁知道NTFS文件系统中的“Update Sequence”是什么意思
最近在看NTFS文件系统,其中总是提到“Update Sequence”,不知道它是什么结构,怎样在文件读写时进行改变。 哪位大侠明白,快指点一下吧。 |
|
沙发#
发布于:2002-11-06 11:22
这是用来做校验用的,用来保证文件的完整性,它需要和Update Sequence Array结合起来用。
|
|
|
板凳#
发布于:2002-11-06 13:11
多谢版主:
那么它是依据什么生成的呢?比如文件内容有改动,这样就要对文件有写操作,这时update sequence 和update sequence array会怎样变动呢?或者哪里有这方面的资料可以看呢? |
|
地板#
发布于:2002-11-06 13:20
Update sequence中的值如何取的算法我忘了,不过我记得,用户不用关心这个值的取法,你只需要在读/存的时候,记得正确取代就可以了。
|
|
|
地下室#
发布于:2002-11-06 13:42
我现在就是需要知道Update Sequence的具体算法,因为我想用自己的方式对文件系统进行改动,请问版主,到哪里可以查到这方面的资料呢,现在工作因这个问题陷于停滞,快帮帮我吧!
|
|
5楼#
发布于:2002-11-06 17:25
http://www.scit.wlv.ac.uk/~cm1924/cp3025/filesys/reading/ntfs6/
另外,本站的《NT文件系统内幕》一书应有这方面的描述。 |
|
|
6楼#
发布于:2002-11-06 17:28
NTFS Documentation: Update Sequence Technique
Interest The purpose of update sequence technique (also called fixup technique in the Linux driver) is to detect incomplete multi-sector transfers. All important metadata structures use this technique: FILE records INDX buffers RCRD RSTR How it works Writing a structure to the storage unit involves the following operations: In memory, increment by one the update sequence (a value stored in the header part of the structure). The value 00 00 must be skipped. In memory, patch the update sequence at the end of each sector of the structure, and save the original value in the update sequence array (an array located in the header part of the structure) Copy the structure from memory to the storage unit Reading a structure from the storage unit involves the following operations: Copy the structure from the storage unit to memory In memory, check if its magic number is correct In memory, check if the end of each sector of the structure is the update sequence If this is not the case, it means that the last write operation of this structure has not been completed (e.g. a power failure happened in the middle of the operation) If this is the case, restore in memory the original values at the end of each sector of the structure from the update sequence array Note: Because we don\'t know in which order the storage unit actually writes physical sectors, we must patch the end of each sector of the structure, instead of just the end of the last sector of the structure. Here we rely on the hardware to check data integrity with checksum techniques. |
|
|
7楼#
发布于:2002-11-06 17:41
多谢版主了!
看的出版主真的很费心的搜集资料了,多谢多谢。 不过这些资料我之前已经看到,只是那段关于“Update Sequence\"的解释的话还是没懂,如果有一个具体的例子就好了,不过还是要谢谢你 |
|
8楼#
发布于:2002-11-06 18:03
呵呵, 考验你的时候到了。仔细读一下,应该有发现。
|
|
|
9楼#
发布于:2002-11-07 10:22
听了版主的话,再回过头来看那段解释,然后把磁盘上的数据COPY下来一对照,原来就是这么简单的一件事。
呵呵! 多谢版主:) |
|
10楼#
发布于:2002-11-07 10:44
不客气
|
|
|