Why linux delete files faster than create a file, read the file and delete files what is the process?

A. Why delete files faster than creating documents?

Delete files just because the bitmap bits will be occupied by the inode file chart and dacablock use state from a 1 to a 0, which is equivalent to release these quick use rights.

II. To read the file and delete files of the process?

The process of reading the file: cat / test / file1

        1, enter / test directory, check whether the test directory attributes, the user has permission to access the test directory, the ability to list the contents. . .
        2, if sufficient authority to find the corresponding file name in the directory data block, and reads the inode information corresponding to the file name.
        3, the read inode information corresponding to verify whether the user has permission to read the contents of the file.
        4, from the inode of the file, data blocks to find the pointer is located,
        5, from a data file corresponding to the fast, read the contents.
 
Delete Files: 

1, in the bitmap in the bitmap manager, a file will occupy and use state inode data block, and from 1 to 0, corresponding to the release of the right to use these blocks.

 

III. What is the inode? What is datablock? 

inode is stored file attributes

datablock contents of the file is stored (data)

Guess you like

Origin www.cnblogs.com/github-cn/p/11258095.html