Erstellt von Ahmad Abdelwahed
vor mehr als 9 Jahre
|
||
Two kinds of consistency checks can be made: blocks and files.To check for block consistency, the program builds two tables, each one containing a counter for each block, initially set to 0. The counter in the first table keep track of how many times each block is present in a file; the counter in the second table record how often each block is present in the free list.Missing block doesn't occur in either table. It do no real harm, they waste space and thus reduce the capacity of the disk. The solution to missing blocks is straightforward, the file system checker just adds them to the free list.Duplication free list occurs in twice in free list table. Solution is to rebuild the free list.Duplication data block occurs twice in data list, if we remove one of them then the same block will be in use and fee at the same time, and if we remove both the block will be put onto the free list twice.The appropriate solution is to allocate a free block, copy the contents of the duplicate block into it, and insert the copy into one of the files. In this way, the information content of the files is unchanged, but the file-system structure is at least made consistent. The error should be reported, to allow the user to inspect the damage.
Möchten Sie kostenlos Ihre eigenen Notizen mit GoConqr erstellen? Mehr erfahren.